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 "foundation" param includes a set of browser normalization styles */
@componentry foundation;
/* The "components" param include all of the component styles */
@componentry components;
/* The "utilities" param includes the componentry states styles */
@componentry utilities;
You're ready to start using Componentry.
import { Flex, Text } from 'componentry'
export const GettingStarted = () => {
return (
<Flex>
<Text variant="h1">Radical</Text>
</Flex>
)
}