All Projects → johnpolacek → styled-system-html

johnpolacek / styled-system-html

Licence: MIT license
HTML elements extended as styled components via styled system, ready for theming.

Programming Languages

javascript
184084 projects - #8 most used programming language

Styled System HTML

Build Status

HTML elements extended as components, ready for theming via styled system. Built with/for Styled Components & Styled System

UPDATE: I now recommend using theme-ui instead of this library. Check it out at theme-ui.com

Usage

$ npm i styled-system-html

Create a theme with settings for colors, typography and spacing.

const theme = {
  colors : {'primary':'#071'},
  space : [0,4,8,16,32,64,128]
}

Apply your theme to the element components.

// Header with 2 levels (8px) of padding, 
// blue/primary background and white text.

<Header p={2} bg="primary" color="white">
  My Header
</Header>

Try it out at johnpolacek.github.io/styled-system-html

For more info, see Styled System by Brent Jackson.

--

Created by John Polacek

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