Faency is the Containous React component library.
Run the following command using npm:
npm install @containous/faency --save
If you prefer Yarn, use the following command instead:
yarn add @containous/faency
- Wrap your app with the Faency provider
import React from 'react'
import { Provider as FaencyProvider } from '@containous/faency'
const Root = () => (
<FaencyProvider>
<App />
</FaencyProvider>
)
- In your app you can now import and use Faency components:
import React from 'react'
import { Button } from '@containous/faency'
const App = () => (
<>
<Button variant="primary">Click me</Button>
</>
)
We use Storybook to create a simple, hot-reloading playground for development on Faency components.
You can edit/create a *.story.tsx
file to preview a component.
yarn
yarn run init
yarn start
During this process Faency will be in watch mode which means that any change you made will be automatically applied to storybook and the documentation website.
yarn build
yarn release