All Projects → system-ui → Theme Specification

system-ui / Theme Specification

A specification for defining theme objects & design tokens for use with UI components

Projects that are alternatives of or similar to Theme Specification

Argon Design System
Argon - Design System for Bootstrap 4 by Creative Tim
Stars: ✭ 2,307 (+516.84%)
Mutual labels:  design, design-systems
css-theme-manager
Zero dependency lib to manage CSS themes easily for your app
Stars: ✭ 16 (-95.72%)
Mutual labels:  themes, theming
Awesome Design Systems
A curated list of bookmarks, resources and articles about design systems focused on developers.
Stars: ✭ 222 (-40.64%)
Mutual labels:  design, design-systems
Realtaiizor
C# WinForm UI/UX Component Library
Stars: ✭ 109 (-70.86%)
Mutual labels:  design, themes
Welcome Ui
Customizable design system of @wttj with react • styled-components • styled-system • reakit
Stars: ✭ 256 (-31.55%)
Mutual labels:  design, design-systems
Ui Ux
📝 Curated list for UI/UX Designers
Stars: ✭ 125 (-66.58%)
Mutual labels:  design, design-systems
Mdx Go
⚡️ Lightning fast MDX-based dev server for progressive documentation
Stars: ✭ 340 (-9.09%)
Mutual labels:  design, design-systems
Design System Site
📚 Documentation, rationale and accessibility guidance
Stars: ✭ 72 (-80.75%)
Mutual labels:  design, design-systems
Design
🎨 Everything Design related in OSCA
Stars: ✭ 23 (-93.85%)
Mutual labels:  design, design-systems
meetup
For organizing the design systems meetup in NYC.
Stars: ✭ 23 (-93.85%)
Mutual labels:  design, design-systems
Tachyons Verbose
Functional CSS for humans. Verbose edition.
Stars: ✭ 102 (-72.73%)
Mutual labels:  design, design-systems
Prism
Gett's Design System code generator. Use Zeplin Styleguides as your R&D's Single Source of Truth.
Stars: ✭ 308 (-17.65%)
Mutual labels:  design, design-systems
React Color Tools
A set of tools as React components for working with colors 🎨
Stars: ✭ 87 (-76.74%)
Mutual labels:  design, design-systems
Tachyons
Functional css for humans
Stars: ✭ 11,057 (+2856.42%)
Mutual labels:  design, design-systems
Neumorphic Ui
📚 A library of components based on the concept of neumorphism
Stars: ✭ 82 (-78.07%)
Mutual labels:  design, design-systems
NumericUpDownLib
Implements numeric up down WPF controls to edit/display values (byte, integer, short, ushort etc.) with a textbox and optional up/down arrow (repeat) buttons. Value editing is possible by dragging the mouse vertically/horizontally, clicking up/down buttons, using up/down or left right cursor keys, spinning mousewheel on mouseover, or editing th…
Stars: ✭ 68 (-81.82%)
Mutual labels:  themes, theming
Bootstrap4layouts
A Template for Bootstrap 4 based on my Bootstrap 4 Layouts course on LinkedIn Learning
Stars: ✭ 44 (-88.24%)
Mutual labels:  design, themes
Ant Ux
🎸 A sitemap template for ux design
Stars: ✭ 1,077 (+187.97%)
Mutual labels:  design, design-systems
create-material-ui-app
create-react-app + storybook + storybook-addon-material-ui
Stars: ✭ 55 (-85.29%)
Mutual labels:  themes, theming
Modulz Original Design System Archive
An open-source design system for building scalable, responsive websites and applications.
Stars: ✭ 300 (-19.79%)
Mutual labels:  design, design-systems

System UI Theme Specification

https://system-ui.com

This specification is a work-in-progress. Please see the related issue for more.

The theme object is intended to be a general purpose format for storing design system style values, scales, and/or design tokens. The object itself is not coupled to any particular library's implementation and can be used in places where sharing common style values in multiple parts of a code base is desirable.

Scale Objects

Many CSS style properties accept open-ended values like lengths, colors, and font names. In order to create a consistent styling system, the theme object is centered around the idea of scales, such as a typographic (font-size) scale, a spacing scale for margin and padding, and a color object. These scales can be defined in multiple ways depending on needs, but tend to use arrays for ordinal values like font sizes, or plain objects for named values like colors, with the option of nesting objects for more complex systems.

// example fontSizes scale as an array
fontSizes: [
  12, 14, 16, 20, 24, 32
]
// example colors object
colors: {
  blue: '#07c',
  green: '#0fa',
}
// example nested colors object
colors: {
  blue: '#07c',
  blues: [
    '#004170',
    '#006fbe',
    '#2d8fd5',
    '#5aa7de',
  ]
}

Scale Aliases

For typically ordinal values like font sizes that are stored in arrays, it can be helpful to create aliases by adding named properties to the object.

// example fontSizes aliases
fontSizes: [
  12, 14, 16, 20, 24, 32
]
// aliases
fontSizes.body = fontSizes[2]
fontSizes.display = fontSizes[5]

Excluded Values

Some CSS properties accept only a small, finite number of valid CSS values and should not be included as a scale object. For example, the text-align property accepts the following values: left, right, center, justify, justify-all, start, end, or match-parent. Other properties that are intentionally excluded from this specification include: float, clear, display, overflow, position, vertical-align, align-items, justify-content, and flex-direction.

Keys

The keys in the theme object should typically correspond with the CSS properties they are used for, and follow a plural naming convention. For example, the CSS property font-size is expected to use values from the fontSizes scale, and the color property uses values from the colors scale.

Some keys can be used for multiple CSS properties, where the data type is the same. The color object is intended to be used with any property that accepts a CSS color value, such as background-color or border-color.

Space

The space key is a specially-named scale intended for use with margin, padding, and other layout-related CSS properties. A space scale can be defined as either a plain object or an array, but by convention an array is preferred. This is an intentional constraint that makes it difficult to add "one-off" or "in-between" sizes that could lead to unwanted and rippling affects to layout.

Note: other names under consideration include spacing, spaces, and lengths.

When defining space scales as an array, it is conventional to use the value 0 as the first value so that space[0] === 0.

// example space scale
space: [
  0, 4, 8, 16, 32, 64
]
// example space scale object
space: {
  small: 4,
  medium: 8,
  large: 16,
}
// example space scale with aliases
space: [
  0, 4, 8, 16, 32
]
space.small = space[1]
space.medium = space[2]
space.large = space[3]

Breakpoints

Breakpoints are CSS lengths intended for use in media queries. Commonly, the breakpoints scale is used to create mobile-first responsive media queries based on array values.

Media Queries

For convenience and for use with other styling approaches, a mediaQueries scale derived from the breakpoints scale can be added to the theme object.

breakpoints: [ '40em', '52em', '64em' ]

mediaQueries: {
  small: `@media screen and (min-width: ${breakpoints[0]})`,
  medium: `@media screen and (min-width: ${breakpoints[1]})`,
  large: `@media screen and (min-width: ${breakpoints[2]})`,
}

Key Reference

The following is a list of theme object keys and their corresponding CSS properties. This list may be non-exhaustive.

Theme Key CSS Properties
space margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, grid-gap, grid-column-gap, grid-row-gap
fontSizes font-size
colors color, background-color, border-color
fonts font-family
fontWeights font-weight
lineHeights line-height
letterSpacings letter-spacing
sizes width, height, min-width, max-width, min-height, max-height
borders border, border-top, border-right, border-bottom, border-left
borderWidths border-width
borderStyles border-style
radii border-radius
shadows box-shadow, text-shadow
zIndices z-index
transitions transition

Prior Art

Prior art includes, but is not limited to the following. Please open an issue or pull request to help ensure this list is inclusive.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].