Run the command at the root of your project with the components you want:
pnpm dlx @bolio-ui/cli@latest add button select
Use the name of the component without spaces, in any case: button, Button and copybutton all work. The full list is at bolio-ui.com/r/index.json.
src/components/bolio-uiexample.tsx next to each component, ready to renderThe files are yours from then on. Edit them as you like, and import the component from where it landed:
import Button from './components/bolio-ui/Button'
export default function App() {
return <Button type="success">Save</Button>
}
Nothing is installed with your package manager, and @bolio-ui/core is not needed.
BolioUIProvider, the components use the default theme. Add the provider to switch themeserasableSyntaxOnly off in your tsconfig if you add useKeyboard, Modal, Drawer or Command, because useKeyboard declares two enumsYou do not import @bolio-ui/core/styles.css here. The styles come with each component.
| Argument | What it does |
|---|---|
<component> | one or more components to add |
--dir | folder to write to, relative to the current folder |
--overwrite | replace files that already exist and differ (your edits are lost) |
Run the command again to get a newer version. Files that already exist and differ from the new version are kept, and the command lists them. Compare them with the new version, or run it with --overwrite to replace them.
@bolio-ui/core when you want updates through your package manageradd when you want the code in your project, to change it or to ship only what you use