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-ui, or components/bolio-ui when the project has no src folderexample.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 themesYou 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.
To see what changed and keep your edits:
--overwritegit diff, and undo the lines you want to keep with git restore -p@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