How-to
This guide will help you to install or integrate the Backyard UI with your favorite framework.
Packages
PackagesWe provider several packages with specific purposes.
| Package | Purporse |
|---|---|
| @backyard-ui/core | Core components library |
| @backyard-ui/hooks | Several useful hooks |
| @backyard-ui/utils | Several useful utils |
| @backyard-ui/styles | SCSS Helpers & Tokens |
| @backyard-ui/tailwind | Our tailwind preset, theme and plugins |
Installation
InstallationInstall the following packages:
yarn add @backyard-ui/coreUsage
UsageAfter installing Backyard UI, you will need to set up the CSS at the root of your application.
import '@backyard-ui/core/dist/backyard-ui-core-theme.min.css';
import '@backyard-ui/core/dist/backyard-ui-core-bundle.min.css';
import { Button } from '@backyard-ui/core';
function App() {
return <Button>Hello world!</Button>;
}Setup tailwind (optional)
Setup tailwind (optional)If you already use tailwind install our preset:
yarn add --dev @backyard-ui/tailwind---
// Example: tailwind.config.js
---
const backayrd = require('@backyard-ui/tailwind');
module.exports = {
presets: [backyard.preset],
};This preset includes our tokens, and some plugins.
NOTE
If you are using tailwind it is not necessary to import the theme.
- import '@backyard-ui/core/dist/backyard-ui-core-theme.min.css';Frameworks
FrameworksChoose your favorite framework.