Bolio UI allows you to make beautiful, modern, and fast websites/applications regardless of your design experience, created with React.js.
Create a project with Bolio UI already set up. The command makes the project with the generator of the framework, installs @bolio-ui/core and wraps the app in BolioUIProvider:
pnpm dlx @bolio-ui/cli@latest init my-app -t next
Pick the framework with -t. Without it, the command asks which one you want.
| Template | Creates | Guide |
|---|---|---|
next | Next.js, App Router and TypeScript | Next.js |
vite | Vite, React and TypeScript | Vite |
react-router | React Router in framework mode | Remix |
gatsby | Gatsby and TypeScript | Gatsby |
redwood | RedwoodJS and TypeScript, needs Corepack | RedwoodJS |
tanstack | TanStack Start and TypeScript | TanStack Start |
waku | Waku and TypeScript | Waku |
rwsdk | RedwoodSDK and TypeScript | RedwoodSDK |
astro | Astro with React, needs Node 22 | Astro |
Add -y to skip every question and --icons to also install @bolio-ui/icons. The generators run with npx, so Node needs npm.
Run it at the root of a project you already have. It detects Next.js, Vite, React Router, Remix, Gatsby, RedwoodJS, TanStack Start, Waku, RedwoodSDK or Astro, installs @bolio-ui/core with the package manager of your lockfile, and edits the root file of the app:
pnpm dlx @bolio-ui/cli@latest init
If a file does not look the way the command expects, it leaves the file alone and prints the lines to add. Running it again changes nothing. To do the same by hand, follow the next two steps.
Inside your React project directory, install Bolio UI by running any of the following:
pnpm add @bolio-ui/core
For Bolio UI to work correctly, you need to set up the BolioUIProvider and the CssBaseline at the root of your application.
Go to the root of your application and do this:
import * as React from 'react'
// 1. import the styles once, `BolioUIProvider` and `CssBaseline`
import '@bolio-ui/core/styles.css'
import { BolioUIProvider, CssBaseline } from '@bolio-ui/core'
function App({ Component }) {
// 2. Use at the root of your app
return (
<BolioUIProvider>
<CssBaseline />
<Component />
</BolioUIProvider>
)
}
Add this to the root of your app. Use the file of the router you have: pages/_app (create it if it doesn't exist) or app/layout.
// 1. import the styles once, `BolioUIProvider` and `CssBaseline`
import '@bolio-ui/core/styles.css'
import { BolioUIProvider, CssBaseline } from '@bolio-ui/core'
function MyApp({ Component, pageProps }) {
return (
// 2. Use at the root of your app
<BolioUIProvider>
<CssBaseline />
<Component {...pageProps} />
</BolioUIProvider>
)
}
export default MyApp
Neither router needs a custom _document or a styles registry: the CSS ships as a plain stylesheet, not injected at render time.
For more information about Next.js + Bolio UI check out the documentation.
Once Bolio UI is installed you can use any of the components as follows. Bolio UI uses tree-shaking so the unused modules will not be included in the bundle during the build process and each component is exported separately.
import { Button } from '@bolio-ui/core'
const Component = () => <Button>Click me</Button>
| Attribute | Type | Accepted values | Description | Default |
|---|---|---|---|---|
| themes | Array<BolioUIThemes> | - | Custom themes added to the default light and dark themes | - |
| themeType | string | light, dark or the type of a custom theme | Theme applied to every component | light |
We're excited to see the community adopt Bolio UI, raise issues, and provide feedback. Whether it's a feature request, bug report, or a project to showcase, please get involved!
PR's on Bolio UI are always welcome, please see our contribution guidelines to learn how you can contribute to this project.