Install componentry and import the styles. Componentry uses PostCSS to convert custom @componentry
directives to CSS.
npm install componentry postcss autoprefixer
Include Componentry's PostCSS plugin in your config. The plugin converts the@componentry
directives into styles.
{
"plugins": [require("componentry/postcss"), require("autoprefixer")]
}
The foundation
directive is converted to the base styles, and the components
directive is converted to the component styles.
/* The "components" param will include all component styles */
@componentry foundation;
@componentry components;
/* Or each component style can be selectively included */
@componentry Alert;
@componentry Badge;
@componentry Button;
/* ... */
You're ready to start using Componentry.
import { Flex, Text } from 'componentry'
export const GettingStarted = () => {
return (
<Flex>
<Text variant="h1">Radical</Text>
</Flex>
)
}