All Projects → styled-system → Styled System

styled-system / Styled System

Licence: mit
⬢ Style props for rapid UI development

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Styled System

Grid
This package has moved and renamed
Stars: ✭ 2,079 (-70.83%)
Mutual labels:  layout, styled-components, responsive, css-in-js, emotion
tsstyled
A small, fast, and simple CSS-in-JS solution for React.
Stars: ✭ 52 (-99.27%)
Mutual labels:  styled-components, styling, emotion, css-in-js, theming
Filbert Js
A lightweight(~1kb) css-in-js framework
Stars: ✭ 167 (-97.66%)
Mutual labels:  styling, styled-components, css-in-js, emotion
rebass
⚛️ React primitive UI components built with styled-system.
Stars: ✭ 7,844 (+10.08%)
Mutual labels:  styled-components, layout, typography, emotion
Design System Utils
👩‍🎨 Access your design tokens with ease
Stars: ✭ 465 (-93.47%)
Mutual labels:  tokens, styled-components, css-in-js, emotion
Styled-Responsive-Media-Queries
Responsive Media Queries for Emotion styled or styled-components — Standard size from Chrome DevTools.
Stars: ✭ 33 (-99.54%)
Mutual labels:  styled-components, responsive, emotion, css-in-js
Twin.macro
🦹‍♂️ Twin blends the magic of Tailwind with the flexibility of css-in-js (emotion, styled-components, stitches and goober) at build time.
Stars: ✭ 5,137 (-27.91%)
Mutual labels:  styled-components, css-in-js, emotion
Interfacss
The CSS-inspired styling and layout framework for iOS
Stars: ✭ 92 (-98.71%)
Mutual labels:  layout, styling, theming
Styled Breakpoints
Simple and powerful tool for creating breakpoints in styled components and emotion. 💅
Stars: ✭ 428 (-93.99%)
Mutual labels:  styled-components, css-in-js, emotion
Layouts
Grab-and-go layouts for React
Stars: ✭ 202 (-97.17%)
Mutual labels:  layout, styled-components, emotion
Figma Theme
Generate development-ready theme JSON files from Figma Styles
Stars: ✭ 130 (-98.18%)
Mutual labels:  tokens, design-systems, css-in-js
standard-components
A specification for functional UI components
Stars: ✭ 52 (-99.27%)
Mutual labels:  design-systems, layout, typography
Interior
Design system for the modern web.
Stars: ✭ 77 (-98.92%)
Mutual labels:  layout, typography, design-systems
Gatsby V2 Tutorial Starter
Gatsby V2 Starter - product of step by step tutorial
Stars: ✭ 139 (-98.05%)
Mutual labels:  typography, styled-components, emotion
Fluid System
Fluid System is a style props function transformer for generating fluid styles. 💦
Stars: ✭ 130 (-98.18%)
Mutual labels:  typography, styled-components, emotion
Styled Typography
Typograpy components for react and styled-components
Stars: ✭ 113 (-98.41%)
Mutual labels:  typography, styled-components, css-in-js
Polished
A lightweight toolset for writing styles in JavaScript ✨
Stars: ✭ 7,074 (-0.73%)
Mutual labels:  styling, styled-components, css-in-js
Design System
Priceline.com Design System
Stars: ✭ 604 (-91.52%)
Mutual labels:  design-systems, styled-components, css-in-js
Styled Tools
Useful interpolated functions for CSS-in-JS
Stars: ✭ 761 (-89.32%)
Mutual labels:  styled-components, css-in-js, emotion
satchel
The little bag of CSS-in-JS superpowers
Stars: ✭ 14 (-99.8%)
Mutual labels:  styled-components, emotion, css-in-js

Styled System

Responsive, theme-based style props for building design systems with React https://styled-system.com

stars Build Status Downloads Version spectrum-badge size MIT License system-ui/theme

npm i styled-system

Features

  • Add style props that hook into your own theme
  • Quickly set responsive font-size, margin, padding, width, and more with props
  • Influenced by constraint-based design system principles
  • Typographic scale
  • Spacing scale for margin and padding
  • Works with any color palette
  • Works with most css-in-js libraries, including styled-components & emotion
  • Used in Rebass, Reflexbox, and the Priceline Design System

"This is honestly my favourite way to build UI components right now party parrot"

Varun Vachhar

"If you haven't seen Styled System before, do yourself a favour and check it out. It's been a huge influence in my thinking on component-oriented styles."

Mark Dalgleish

"The future of css-in-js is going to look something like styled-system with its responsive values."

Kye Hohenberger

"Coming from @tachyons_css, the styled-system utilities from @jxnblk is the missing link I’ve been looking for."

Nathan Young

"If you make websites/apps with React check out Styled System if you haven't already. You will be amazed at how much faster you can build."

David Yeiser

"If you like Tachyons you will love styled-system. If you don't like Tachyons, you will love styled-system."

Adam Morse

"Styled System is one of the best libraries I have ever used."

Miha Sedej

Try It Out

Try the examples on CodeSandbox

Table of Contents

Usage

// Example uses styled-components, but styled-system works with most other css-in-js libraries as well
import styled from 'styled-components'
import { space, layout, typography, color } from 'styled-system'

// Add styled-system functions to your component
const Box = styled.div`
  ${space}
  ${layout}
  ${typography}
  ${color}
`

Each style function exposes its own set of component props that handle styles based on values defined in a theme.

// width: 50%
<Box width={1/2} />

// font-size: 20px (theme.fontSizes[4])
<Box fontSize={4} />

// margin: 16px (theme.space[2])
<Box m={2} />

// padding: 32px (theme.space[3])
<Box p={3} />

// color
<Box color='tomato' />

// color: #333 (theme.colors.gray[0])
<Box color='gray.0' />

// background color
<Box bg='tomato' />

Responsive Style Props

Set responsive width, margin, padding, font-size, and other properties with a shorthand array syntax. Read more

// responsive width
<Box width={[ 1, 1/2, 1/4 ]} />

// responsive font-size
<Box fontSize={[ 2, 3, 4 ]} />

// responsive margin
<Box m={[ 1, 2, 3 ]} />

// responsive padding
<Box p={[ 1, 2, 3 ]} />

To learn more, see the Getting Started guide or read the docs.

Docs


Further Reading

Built with Styled System

Related

MIT License

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