All Projects → system-ui → Theme Ui

system-ui / Theme Ui

Licence: mit
Build consistent, themeable React apps based on constraint-based design principles

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Theme Ui

theme-ui-native
Build consistent, themeable React Native apps based on constraint-based design principles
Stars: ✭ 67 (-98.39%)
Mutual labels:  color, layout, typography, style, design-tokens, design-system
rebass
⚛️ React primitive UI components built with styled-system.
Stars: ✭ 7,844 (+89.01%)
Mutual labels:  color, layout, typography, emotion, design-system
Doric
Protocol oriented, type safe, scalable design system foundation swift framework for iOS.
Stars: ✭ 75 (-98.19%)
Mutual labels:  design, design-system, typography, color
Interior
Design system for the modern web.
Stars: ✭ 77 (-98.14%)
Mutual labels:  layout, design-system, typography
Fluid System
Fluid System is a style props function transformer for generating fluid styles. 💦
Stars: ✭ 130 (-96.87%)
Mutual labels:  design-system, typography, emotion
ColorPick.js
A simple and minimal jQuery color picker plugin for the modern web.
Stars: ✭ 48 (-98.84%)
Mutual labels:  color, design, style
Leerraum.js
A PDF typesetting library with exact positioning and hyphenated line breaking
Stars: ✭ 233 (-94.39%)
Mutual labels:  design, layout, typography
Styled System
⬢ Style props for rapid UI development
Stars: ✭ 7,126 (+71.71%)
Mutual labels:  layout, typography, emotion
standard-components
A specification for functional UI components
Stars: ✭ 52 (-98.75%)
Mutual labels:  color, layout, typography
Lab
React UI component design tool
Stars: ✭ 349 (-91.59%)
Mutual labels:  design, design-system
parsers
Specify is a central platform for companies who want to unify their brand identity, by connecting their design system tools.
Stars: ✭ 50 (-98.8%)
Mutual labels:  design-tokens, design-system
leafygreen-ui
LeafyGreen UI – LeafyGreen's React UI Kit
Stars: ✭ 112 (-97.3%)
Mutual labels:  emotion, design-system
stitchwind
A bridge between Tailwind and Stitches
Stars: ✭ 33 (-99.2%)
Mutual labels:  design-tokens, design-system
terminal-style
🎨 Return your terminal message in style! Change the text style, text color and text background color from the terminal, console or shell interface with ANSI color codes. Support for Laravel and Composer.
Stars: ✭ 16 (-99.61%)
Mutual labels:  color, style
themekit
Build system of design-tokens for any platforms
Stars: ✭ 60 (-98.55%)
Mutual labels:  design-tokens, design-system
gatsby-starter-specimens
Leverage the wide variety of powerful React components to build your design system. Display colors, typography or any other design tokens with ease. Works seamlessly with MDX.
Stars: ✭ 35 (-99.16%)
Mutual labels:  mdx, design-system
visage
Visage design system
Stars: ✭ 12 (-99.71%)
Mutual labels:  emotion, design-system
word-color
Finds colors associated with a word, basically https://picular.co/
Stars: ✭ 39 (-99.06%)
Mutual labels:  color, design
Welcome Ui
Customizable design system of @wttj with react • styled-components • styled-system • reakit
Stars: ✭ 256 (-93.83%)
Mutual labels:  design, design-system
Blotter
A JavaScript API for drawing unconventional text effects on the web.
Stars: ✭ 2,833 (-31.73%)
Mutual labels:  design, typography

Theme UI

The Design Graph Framework

 

GitHub GitHub Stars npm (latest) npm (develop)
Contributors Activity
Size Tree Shaking MIT license Join our Discord community
Build Status This project is using Cypress for end-to-end tests. This project is using Percy.io for visual regression testing.


Theme UI is a library for creating themeable user interfaces based on constraint-based design principles. Build custom component libraries, design systems, web applications, Gatsby themes, and more with a flexible API for best-in-class developer ergonomics.

stable docs: https://theme-ui.com
develop (prerelease) docs: https://dev.theme-ui.com


Built for design systems, white-labels, themes, and other applications where customizing colors, typography, and layout are treated as first-class citizens and based on a standard Theme Specification, Theme UI is intended to work in a variety of applications, libraries, and other UI components. Colors, typography, and layout styles derived from customizable theme-based design scales help you build UI rooted in constraint-based design principles.

  • The next evolution of Styled System
  • From the creators of utility-based, atomic CSS methodologies
  • Theme-based styling with the sx prop
  • Style MDX content with a simple, expressive API
  • Works with Typography.js themes
  • Compatible with virtually any UI component library
  • Works with existing Styled System components
  • Quick mobile-first responsive styles
  • Built-in support for dark modes
  • Primitive page layout components
  • Plugin for use in Gatsby sites and themes
  • Completely customizable with robust theming
  • Built with a standard Theme Specification for interoperability
  • Built with Emotion for scoped styles

Getting Started

npm install theme-ui

Any styles in your app can reference values from the global theme object. To provide the theme in context, wrap your application with the ThemeProvider component and pass in a custom theme object.

// basic usage
import { ThemeProvider } from 'theme-ui'
import theme from './theme'

export default (props) => (
  <ThemeProvider theme={theme}>{props.children}</ThemeProvider>
)

The theme object follows the System UI Theme Specification, which lets you define custom color palettes, typographic scales, fonts, and more. Read more about theming.

// example theme.js
export default {
  fonts: {
    body: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif',
    heading: '"Avenir Next", sans-serif',
    monospace: 'Menlo, monospace',
  },
  colors: {
    text: '#000',
    background: '#fff',
    primary: '#33e',
  },
}

sx prop

The sx prop works similarly to Emotion's css prop, accepting style objects to add CSS directly to an element in JSX, but includes extra theme-aware functionality. Using the sx prop for styles means that certain properties can reference values defined in your theme object. This is intended to make keeping styles consistent throughout your app the easy thing to do.

The sx prop only works in modules that have defined a custom pragma at the top of the file, which replaces the default React JSX functions. This means you can control which modules in your application opt into this feature without the need for a Babel plugin or additional configuration.

/** @jsxImportSource theme-ui */

export default (props) => (
  <div
    sx={{
      fontWeight: 'bold',
      fontSize: 4, // picks up value from `theme.fontSizes[4]`
      color: 'primary', // picks up value from `theme.colors.primary`
    }}>
    Hello
  </div>
)

Read more about how the custom pragma works.

Responsive styles

The sx prop also supports using arrays as values to change properties responsively with a mobile-first approach. This API originated in Styled System and is intended as a terser syntax for applying responsive styles across a singular dimension.

/** @jsxImportSource theme-ui */

export default (props) => (
  <div
    sx={{
      // applies width 100% to all viewport widths,
      // width 50% above the first breakpoint,
      // and 25% above the next breakpoint
      width: ['100%', '50%', '25%'],
    }}
  />
)

Documentation

MIT License

Contributors

Thanks goes to these wonderful people (emoji key):


Brent Jackson

🤔 💻 🎨 📖 💡 ⚠️ 👀

Piotr Monwid-Olechnowicz

💻 📖 ⚠️ 👀

Dany Castillo

💻 📖 💡 ⚠️

Jordan Overbye

💻 💡 ⚠️

Lachlan Campbell

💻 💡 ⚠️ 👀 📖 💬

John Otander

💻 👀 📖 ⚠️ 🤔

David Burles

💻 👀 ⚠️ 📖

Max Stoiber

💻 👀 ⚠️ 💡

Atanas Stoyanov

💻 💬 ⚠️ 🐛 📖

Lennart

💻 🐛 📖 💡

Aleksandra Sikora

💻

LB

💻 ⚠️

Francis Champagne

💻 🐛 ⚠️ 📖

Alex Page

💻 📖

Adam Schay

💻

Alex

💻 📖

James Edmonds

💻 📖

Florent SCHILDKNECHT

💻 📖

Cole Bemis

💻 ⚠️ 📖

John Letey

📖

Yuraima Estevez

💻

Allan Pope

💻 📖

Emmanuel Pilande

💻

Justin Hall

💻

Marek

💻 🐛

Björn Clees

📖 💻

Iurii Kucherov

📖

Joe Strouth

💻 🐛

Stewart Everett

💻

Travis Arnold

💻 📖

Ivo Reis

💻

Benedikt Rötsch

🐛 📖

Jacob Cofman

📖

John Letey

📖

Lawrence Gosset

📖

Markos Konstantopoulos

📖

Robin Millette

💻

Rodney Folz

💻

Rodrigo Pombo

💻 ⚠️ 📖

Scott Silvi

📖

Shawn Allen

📖

Tomas Carnecky

💻 🐛

John Polacek

💻 🐛

mackie

💻

Aaron Adams

💻 🐛 📖

Amberley

💻

Andreea Năstase

📖

Anson Low Z.F

🐛 📖

Bernhard Gschwantner

💻

Bhanu Prakash Korthiwada

📖

Bruno Lemos

📖

Bryce Fischer

💻

Dan Wood

📖

Debs

📖

Edward O'Reilly

💻 🐛

Eric Schaefer

💻

Felix Green

📖

Gerhard Bliedung

💻 🐛

Guayo Mena

💡

Guilherme Lima

📖

Herb Caudill

📖

Jacob Bolda

💻 🐛

Jason Lengstorf

🐛 📖

Jason Rundell (he/him)

💡

Joe Race

📖

Kanstantsin Klimashevich

📖

Eka

📖 🐛

Keir Williams

📖

Kristóf Poduszló

💻 🐛 🤔

Kyle Gill

📖

Kyle Holmberg

📖

Jay Laiche

💻

Marc Wiest

💻

Matheus Teixeira

💻

matt-cratebind

📖

Matt Zabriskie

💻

Maxime Khoy

💻

Michael Friedman

📖

Michael Zetterberg fd. Lopez

💻

Nathan Knowler

💻

Neeraj Lagwankar

📖

Owen Young

💻

Patrick Arminio

💻 🐛

Pedro Duarte

💻

Ray Clanan

💻

Rich Werden

📖

Rob Phoenix

📖 🐛

Robert Moggach

💻 🐛

Anand Narayan

💻 🐛

Sam Poder

📖

Sam Rose

📖

Sohrab

💻

Spencer Rinehart

💻

Steve

📖

Steve Barton

📖

Tim Reynolds

💻 🐛

Vinícius Lemes

📖

Yihwan Kim

💻 🐛

Yuriy Burychka

📖

Zolwiastyl

💻

Amrish Kushwaha

💻

Joe Bell

💻 🐛

kenny-loveholidays

💻

⦇⦀∙ˇ∎ˇ∙⦀⦈

💻 🐛

navsgh

📖

Shane O'Neill

📖

汪磊

💻 🐛

Carolin Maisenbacher

💻 📖 ⚠️

Alex Chan

📖 💡 ⚠️ 💻

Kenny

💻

Jordie Bodlay

📖

Matt Gleich

📖

William Pei

📖 💡 💻 ⚠️

This project follows the all-contributors specification. Contributions of any kind welcome!

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].