import Docs from 'src/templates/Docs' import { Spacer } from 'core' export const meta = { title: 'About Bolio UI', description: 'Bolio UI is a dedicated library designed to enhance both user and developer experiences.', sidebar: 'guide', group: 'Guide' } ## About Bolio UI ### Components library Bolio UI is a dedicated library designed to enhance both user and developer experiences. The development of Bolio UI commenced in july 2022, and its 1.0 version was officially launched on september, 2022, and since then, more releases have been published. ### Browser support Bolio UI is tested on actual devices across various browsers, including: Chrome, Safari, Firefox, Edge, Safari for iOS, Chrome for Android. Testing in other browsers is not performed. All components and hooks were tested to work in the following browsers: - • Chromium browsers 108+ – Chrome, Edge, Chrome for Android, etc. - • Firefox 101+ - • Safari 15.4+ - • IE (any version) is not supported ### Releases cycle All `@bolio-ui/*` packages follow semver: - • Patches (1.0.X) are typically released at intervals of one to two weeks. - • Minor versions (1.X.0) are generally released on the first Monday of each month or bi-monthly. - • Major versions (X.0.0) are deployed when there are significant changes that necessitate breaking compatibility. Usually, a new major version is released approximately every 6 months to 1 year. ### Project maintenance Bolio UI is make and overseen by Bruno Andrade. The inclusion of new features and components/hooks in the library is largely influenced by community feedback. You're welcome to engage in discussions about upcoming features on Github. export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Spacer } from 'core' export const meta = { title: 'Agent Skills', description: 'Teach AI assistants to build interfaces with Bolio UI components, setup and theming using the Bolio UI Skill.', sidebar: 'guide', group: 'Guide' } ## Agent Skills ### Installation The Bolio UI Skill gives your AI assistant the setup, rules and docs links it needs to build with `@bolio-ui/core`. Install it with the skills package: The Skill goes to `.agents/skills/bolio-ui` in your project, which Cursor, Codex, GitHub Copilot and other tools read, and is linked for Claude Code. Run the command at the root of your project. ### Manual install Copy the [skills/bolio-ui](https://github.com/bolio-ui/bolio-ui/tree/master/skills/bolio-ui) folder to the skills directory of your tool. Use your project to load the Skill only where Bolio UI is used, or your home directory to load it in every project: - • `.agents/skills/` for Cursor, Codex, GitHub Copilot and Antigravity - • `.claude/skills/` for Claude Code - • `.opencode/skills/` for OpenCode ### Usage Your assistant discovers the Skill by itself when you work with `@bolio-ui/core`, or you can call it by name with `/bolio-ui`. Ask your assistant to: - • Build components using Bolio UI - • Create pages with Bolio UI components - • Customize themes and colors - • Read the documentation of a component ### What's included - • Installation with the CLI or by hand, for every supported framework - • Rules for building with the components, such as theme colors instead of hex values - • Links to the [LLMs.txt](/docs/guide/llms-txt) files, so props and examples come from the docs and not from memory - • The path to the [migration guide](/docs/guide/migration-v2-to-v3) for projects coming from v2 ### Structure ```text skills/bolio-ui/ └── SKILL.md # Main skill documentation ``` ### Related documentation - • [Agent Skills specification](https://agentskills.io): the format of a Skill - • [Claude Agent Skills](https://docs.claude.com/en/docs/agents-and-tools/agent-skills/overview): Skills in Claude - • [Cursor Skills](https://cursor.com/docs/context/skills): Skills in Cursor - • [OpenCode Skills](https://opencode.ai/docs/skills): Skills in OpenCode export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Spacer } from 'core' export const meta = { title: 'AGENTS.md', description: 'Add the Bolio UI docs to the AGENTS.md of your project, so AI coding agents read them before writing UI code.', sidebar: 'guide', group: 'Guide' } ## AGENTS.md ### Usage Run the command at the root of your project. It adds a Bolio UI section to `AGENTS.md`, and creates the file when it does not exist: Or give the file to write, for example `CLAUDE.md`: ### What it does - • Adds a Bolio UI section between `` markers, keeping the rest of the file as it is - • Links the [LLMs.txt](/docs/guide/llms-txt) files, so the agent reads the real props and examples of each component - • Updates the section when you run it again, without repeating it Nothing is downloaded to your project. The agent reads the docs from [bolio-ui.com](https://bolio-ui.com) when it needs them. ### Options | Argument | What it does | | -------- | --------------------------------------------------------- | | `[file]` | file to write, relative to the current folder (AGENTS.md) | ### Related documentation - • [AGENTS.md](https://agents.md): the format of instructions for coding agents - • [CLAUDE.md](https://docs.claude.com/en/docs/claude-code/memory): the Claude equivalent of AGENTS.md - • [Agent Skills](/docs/guide/agent-skills): the Bolio UI Skill, for tools that load Skills export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Link, Spacer } from 'core' export const meta = { title: 'Example with Astro', description: 'Set up Bolio UI in an Astro application.', sidebar: 'guide', group: 'Guide' } ## Example with Astro ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Generate new application Follow Astro installation guide to create new application: Then add the React integration: ### Installation Install dependencies: ### Setup Astro renders React only in islands, so there is no single root to wrap. Create a component with the `BolioUIProvider`, `CssBaseline` and styles import in `src/components/BolioUI.tsx`: ```jsx import type { ReactNode } from 'react' import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' import '@bolio-ui/core/styles.css' export default function BolioUI({ children }: { children: ReactNode }) { return ( {children} ) } ``` Then wrap the content of each island with it in an `.astro` file: ```jsx --- import BolioUI from '../components/BolioUI' import Counter from '../components/Counter' --- ``` Ready to go! Start the development server: export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Link, Spacer } from 'core' export const meta = { title: 'Example with Gatsby', description: 'Set up Bolio UI in a Gatsby application.', sidebar: 'guide', group: 'Guide' } ## Example with Gatsby ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Generate new application Follow Gatsby quick start guide to create new Gatsby application: ### Installation Install dependencies: ### Setup Gatsby has no root component, so wrap the app with `wrapRootElement` to set up the `BolioUIProvider` and the `CssBaseline` on every page. Create `gatsby-browser.tsx` (or `.js`): ```jsx import * as React from 'react' import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' import '@bolio-ui/core/styles.css' export const wrapRootElement = ({ element }) => ( {element} ) ``` Then create `gatsby-ssr.tsx` (or `.js`) to render the same wrapper on the server: ```jsx export { wrapRootElement } from './gatsby-browser' ``` Ready to go! Start the development server: export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { Link, Spacer } from 'core' export const meta = { title: 'Example with Next.js', description: 'Bolio UI is totally compatible with Next.js you just need to customize the _app.jsx entry file to load the provider.', sidebar: 'guide', group: 'Guide' } ## Example with Next.js ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Server Render All Components of `@bolio-ui/core` are compatible with **Server Render**. In fact, the page you see now is rendered by the server. Server-side rendering (SSR) is the process of rendering web pages on a server and passing them to the browser (client-side), instead of rendering them in the browser. SSR sends a fully rendered page to the client; the client's JavaScript bundle takes over and enables the SPA framework to operate, the best option to use server side render in React.js is using Next.js. If you are worried about losing the advantages of a Single Page Application by implementing server-side rendering, you can use the `hybrid render` application. Please read the post from the Next.js team to learn more. ### Next.js Bolio UI works with the Pages Router and with the App Router. #### Pages Router Next.js already adds the styles to the HTML, so you don't need a custom `_document`. Import the stylesheet once and set up the `BolioUIProvider` and `CssBaseline` in `pages/_app.js`: ```jsx import '@bolio-ui/core/styles.css' import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' function MyApp({ Component, pageProps }) { return ( ) } export default MyApp ``` #### App Router Import the stylesheet once in `app/layout.js`: ```jsx import '@bolio-ui/core/styles.css' import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' export default function RootLayout({ children }) { return ( {children} ) } ``` The components are Client Components, so you can use them in Server Components without adding `'use client'`. ### Custom Server The stylesheet is a plain CSS file, not injected at render time, so a custom server needs nothing beyond serving `@bolio-ui/core/styles.css` (or letting your bundler include it) and rendering the app normally: ```jsx import React from 'react' import ReactDOM from 'react-dom/server' import App from './app' export default (req, res) => { const app = ReactDOM.renderToString() const html = ReactDOM.renderToStaticMarkup(
) res.end('' + html) } ``` export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Link, Spacer, Snippet } from 'core' export const meta = { title: 'Example with RedwoodJS', description: 'Set up Bolio UI in a RedwoodJS application.', sidebar: 'guide', group: 'Guide' } ## Example with RedwoodJS ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Generate new application Follow Redwood getting started guide to create new Redwood application: Redwood needs Node 20. Switch with `nvm use 20` before creating the project, and run `corepack enable` if `yarn` is not found. ### Installation Open web directory before installing dependencies: Install dependencies: ### Setup Add styles imports, BolioUIProvider and CssBaseline to web/src/App.tsx: ```jsx import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' import '@bolio-ui/core/styles.css' import { FatalErrorBoundary, RedwoodProvider } from '@redwoodjs/web' import { RedwoodApolloProvider } from '@redwoodjs/web/apollo' import FatalErrorPage from 'src/pages/FatalErrorPage' import Routes from 'src/Routes' const App = () => ( ) export default App ``` Ready to go! Start the development server: export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Link, Spacer } from 'core' export const meta = { title: 'Example with RedwoodSDK', description: 'Set up Bolio UI in a RedwoodSDK application.', sidebar: 'guide', group: 'Guide' } ## Example with RedwoodSDK ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Generate new application Follow RedwoodSDK quick start guide to create new application: ### Installation Install dependencies: ### Setup RedwoodSDK is not RedwoodJS. It runs on Cloudflare Workers with React Server Components, and `BolioUIProvider` is already a client component. The document is a server component, so it cannot import CSS directly. Import the stylesheet as a URL and link it in the ``, then add BolioUIProvider and CssBaseline to `src/app/document.tsx`: ```jsx import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' import bolioStyles from '@bolio-ui/core/styles.css?url' export const Document: React.FC<{ children: React.ReactNode }> = ({ children }) => ( My app {children} ) ``` Ready to go! Start the development server: export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Link, Spacer } from 'core' export const meta = { title: 'Example with Remix', description: 'Set up Bolio UI in a Remix application.', sidebar: 'guide', group: 'Guide' } ## Example with Remix ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Generate new application Follow Remix getting started guide to create new Remix application: ### Installation Install dependencies: ### Setup Add styles imports, BolioUIProvider and CssBaseline to app/root.tsx: ```jsx import { Links, LiveReload, Meta, Outlet, Scripts, ScrollRestoration } from '@remix-run/react' import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' import '@bolio-ui/core/styles.css' export default function App() { return ( ) } ``` Ready to go! Start the development server: export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Link, Spacer } from 'core' export const meta = { title: 'Example with TanStack Start', description: 'Set up Bolio UI in a TanStack Start application.', sidebar: 'guide', group: 'Guide' } ## Example with TanStack Start ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Generate new application Follow TanStack Start getting started guide to create new application: ### Installation Install dependencies: ### Setup Add styles imports, BolioUIProvider and CssBaseline to `src/routes/__root.tsx`: ```jsx import { HeadContent, Scripts, createRootRoute } from '@tanstack/react-router' import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' import '@bolio-ui/core/styles.css' export const Route = createRootRoute({ shellComponent: RootDocument }) function RootDocument({ children }: { children: React.ReactNode }) { return ( {children} ) } ``` Ready to go! Start the development server: export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Link, Spacer } from 'core' export const meta = { title: 'Example with Vite', description: 'Set up Bolio UI in a Vite application.', sidebar: 'guide', group: 'Guide' } ## Example with Vite ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Generate new application Follow Vite getting started guide to create new Vite application: ### Installation Install dependencies: ### Setup Add styles imports, BolioUIProvider and CssBaseline to src/App.tsx: ```jsx import { BolioUIProvider, CssBaseline, Text } from '@bolio-ui/core' import '@bolio-ui/core/styles.css' export default function App() { return ( Your app page here ) } ``` Ready to go! Start the development server: export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Link, Spacer } from 'core' export const meta = { title: 'Example with Waku', description: 'Set up Bolio UI in a Waku application.', sidebar: 'guide', group: 'Guide' } ## Example with Waku ### Get started with an example To begin, the most straightforward approach is to utilize one of the provided templates. These templates come pre-configured with the necessary settings, such as CssBaseline and other fundamental components. If you're new to GitHub and need guidance on initiating a project using a template, you can access comprehensive instructions on how to get started on this example. ### Generate new application Follow Waku guide to create new application: ### Installation Install dependencies: With Yarn, the Waku template also needs `@babel/core`, which Yarn does not install as a peer dependency. Add it with `yarn add @babel/core`. ### Setup Waku renders layouts as React Server Components, and `BolioUIProvider` is already a client component, so it can be used in the layout directly. Add styles imports, BolioUIProvider and CssBaseline to `src/pages/_layout.tsx`: ```jsx import '../styles.css' import '@bolio-ui/core/styles.css' import type { ReactNode } from 'react' import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' export default async function RootLayout({ children }: { children: ReactNode }) { return ( {children} ) } export const getConfig = async () => { return { render: 'static' } as const } ``` Ready to go! Start the development server: export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { Text, Spacer } from 'core' export const meta = { title: 'Contribute', description: 'Ways to contribute to Bolio UI, from documentation to code.', sidebar: 'guide', group: 'Guide' } ## Contribute ### Ways to contribute First and foremost, we appreciate your interest in contributing to Bolio UI! Your contributions play a crucial role in enhancing the project. Here are various ways you can get involved - • Enhance documentation: Address incomplete or missing documentation, improve wording, examples, or explanations. - • Provide feedback: We are continually striving to improve Bolio UI. Please share your usage experiences, highlight missing features, and let us know what works well through GitHub Discussions. - • Promote Bolio UI: Share links to the Bolio UI documentation with anyone who might find it useful. - • Contribute to the codebase: Propose new features by opening GitHub Issues, or take on existing issues that align with your interests. - • Conduct a code review: Help us identify issues in the source code or suggest improvements to make Bolio UI more efficient. ### How to contribute? - • Decide on the contribution you want to make. - • For new features, discuss your ideas with the maintainer (via GitHub Discussions) before starting the coding process. - • Once issue details are finalized, adhere to commit conventions as you work on the code. - • Run tests using `npm test` and submit a pull request (pull request) after ensuring all tests pass. - • Undergo a code review, addressing any issues identified by the maintainer. - • If you're unable to complete the task or have a change of plans, no worries! Just inform us in the GitHub issue you initially created. The Bolio UI community is understanding – no judgment or questions if you decide to cancel your submission. - • Your pull request gets merged!" ### npm scripts All npm scripts can be found in the main package.json file. Dedicated scripts are not assigned to individual packages. export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { Spacer } from 'core' import { ThemeGenerator, PackageTabs } from 'src/components' export const meta = { title: 'Customize Themes', description: 'Support a variety of themes, and it is very easy to create or inherit modifications.', sidebar: 'guide', group: 'Theme' } ## Customize Themes ### Usage **Bolio UI** now offers support for a variety of themes, and it is incredibly easy to create or inherit modifications, without the need for third-party styles or configurations. As a basic choice, there are two themes available: `light` and `dark`. ### Theme Generator Not sure which colors to pick? Try them below. Bolio UI derives the shades it actually uses (light, lighter and dark) from a primary and a secondary color, and gives you the code to drop into `Themes.createFromLight`. For the full version, with a live preview of every `Button` variant in light and dark, open the [Theme Generator](/theme-generator) page. ### Switch themes To change between the default themes, you simply need to adjust the value of `themeType`. You can follow the steps below: 1. Ensure that `BolioUIProvider` and `CssBaseline` are already placed in the root component. 2. Modify the `themeType` value, and all components will automatically adapt to the new theme. ```jsx // NAME:src/app.js import { CssBaseline, BolioUIProvider } from '@bolio-ui/core' const App = () => { const [themeType, setThemeType] = useState('light') const switchThemes = () => { setThemeType((last) => (last === 'dark' ? 'light' : 'dark')) } return ( ) } ``` ### Customizing theme Modifying a theme in Bolio UI is straightforward. You only need to supply a new theme `Object`, and all the components will seamlessly adjust. Here is a complete [sample](https://github.com/bolio-ui/bolio-ui/tree/master/examples/custom-themes) for your reference. ```jsx import { CssBaseline, BolioUIProvider, Themes } from '@bolio-ui/core' const myNewTheme1 = Themes.createFromLight({ type: 'newTheme', palette: { success: '#000' } }) const App = () => ( ) ``` The `Themes.createFromLight` function enables you to derive a new theme from the Light Theme. Likewise, you have the option to create a theme rooted in the dark style using : `Themes.createFromDark`. Alternatively, you can craft a theme based on your custom preferences: ```jsx const myBaseTheme = { ... } const myNewTheme2 = Themes.create(myBaseTheme, { type: 'newTheme2', palette: { success: '#000', }, }) ``` ### Get types If you require a comprehensive type definition while making theme adjustments, you can consult the [type file](https://github.com/bolio-ui/bolio-ui/blob/master/core/Themes/Presets/index.ts) already available. For projects that support TypeScript, you can directly access the type within the package. ```ts import { BolioUIThemes, BolioUIThemesFont, BolioUIThemesPalette, BolioUIThemesExpressiveness, BolioUIThemesLayout } from '@bolio-ui/core' // usage: const myStyles: BolioUIThemes = { /* ... */ } const myPalette: Partial = { /* ... */ } ``` ### Customizer #### ClassName You have the ability to customize the style by specifying a `className` for the component. ```jsx import { Button, Row } from '@bolio-ui/core' const MyPage = () => ( ) // in css file: .my-page-button { padding: 0; } ``` #### Inline styles Using an inline style will effectively supersede the component's default styling. ```jsx const MyPage = () => ( ) ``` ### Build components You can utilize the Bolio UI preset Hooks to access theme states and craft your own components. For additional details, please consult the [useTheme](/docs/hooks/use-theme) documentation. ```jsx import { useTheme } from '@bolio-ui/core' const MyComponent = () => { const theme = useTheme() return (
hello world!
) } ``` ### Fonts In Web applications, certain fonts may not display optimally on Windows, or you might find that font rendering for specific character sets not satisfactory. If this occurs, you have the option to enhance the rendering by adding extra font packages > You're not required to make any changes to CSS files or specify font declarations. #### Install `inter-ui` #### Add `Inter Font` to your project: ```jsx import 'inter-ui/inter.css' ``` ### Themes APIs `Themes` offer a range of static methods that prove valuable when dealing with custom themes: - • `Themes.create` - Create a new theme object. - • `Themes.createFromDark` - Generate a new theme object based on the Dark Theme. - • `Themes.createFromLight` - Construct a new theme object based on the Light Theme. - • `Themes.isPresetTheme` - Verify if a theme serves as the foundation for Bolio UI. - • `Themes.isAvailableThemeType` - Determine if a theme name is available. - • `Themes.hasUserCustomTheme` - Check for the presence of custom themes within a list. - • `Themes.getPresets` - Retrieve a default list of themes. - • `Themes.getPresetStaticTheme` - Access the theme loaded by Bolio UI as the default. export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { Spacer } from 'core' import { Colors } from 'src/components' export const meta = { title: 'Default Theme', description: 'You can use any color anywhere, all colors change with the theme.', sidebar: 'guide', group: 'Theme' } ## Default Theme ### Usage You can use any color anywhere, all colors change with the theme. If you want to customize your colors, please read [use-theme](/docs/hooks/use-theme) to learn more. ```jsx import { useTheme, Text } from '@bolio-ui/core' const TextCustomComponent = () => { const { palette } = useTheme() return TextCustomComponent } ``` ### Colors export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { Attributes, CodeTabs, PackageTabs } from 'src/components' import { Spacer } from 'core' export const meta = { title: 'Getting Started', description: 'Welcome to the Bolio UI documentation! Bolio UI allows you to make beautiful, modern, and fast websites/applications regardless of your design experience.', sidebar: 'guide', group: 'Guide' } ## Getting Started #### Welcome to the Bolio UI documentation! Bolio UI allows you to make beautiful, modern, and fast websites/applications regardless of your design experience, created with React.js. ### New project 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`: 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](/docs/guide/bolio-ui-plus-nextjs) | | `vite` | Vite, React and TypeScript | [Vite](/docs/guide/bolio-ui-plus-vite) | | `react-router` | React Router in framework mode | [Remix](/docs/guide/bolio-ui-plus-remix) | | `gatsby` | Gatsby and TypeScript | [Gatsby](/docs/guide/bolio-ui-plus-gatsby) | | `redwood` | RedwoodJS and TypeScript, needs Corepack | [RedwoodJS](/docs/guide/bolio-ui-plus-redwoodjs) | | `tanstack` | TanStack Start and TypeScript | [TanStack Start](/docs/guide/bolio-ui-plus-tanstack-start) | | `waku` | Waku and TypeScript | [Waku](/docs/guide/bolio-ui-plus-waku) | | `rwsdk` | RedwoodSDK and TypeScript | [RedwoodSDK](/docs/guide/bolio-ui-plus-redwoodsdk) | | `astro` | Astro with React, needs Node 22 | [Astro](/docs/guide/bolio-ui-plus-astro) | Add `-y` to skip every question and `--icons` to also install `@bolio-ui/icons`. The generators run with `npx`, so Node needs npm. ### Existing project 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: 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. ### Install Inside your React project directory, install Bolio UI by running any of the following: ### Setup For Bolio UI to work correctly, you need to set up the `BolioUIProvider` and the `CssBaseline` at the root of your application. #### React Go to the root of your application and do this: ```tsx // NAME: /src/app.js 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 ( ) } ``` #### Next.js 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`. ```tsx // NAME: pages/_app.tsx // 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 ) } export default MyApp ``` ```tsx // NAME: app/layout.tsx // 1. import the styles once, `BolioUIProvider` and `CssBaseline` import '@bolio-ui/core/styles.css' import { BolioUIProvider, CssBaseline } from '@bolio-ui/core' export default function RootLayout({ children }) { return ( {children} ) } ``` 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](/docs/guide/bolio-ui-plus-nextjs). ### Using Bolio UI components 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. ```tsx import { Button } from '@bolio-ui/core' const Component = () => ``` BolioUIProvider.Props | Attribute | Type | Accepted values | Description | Default | | ------------- | ---------------------- | ----------------------------------------------- | ------------------------------------------------------------ | ------- | | **themes** | `Array` | - | 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` | ### Community 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! - • [Instagram](https://instagram.com/bolio.ui) - • [GitHub](https://github.com/bolio-ui/bolio-ui) ### Contributing PR's on Bolio UI are always welcome, please see our [contribution guidelines](https://github.com/bolio-ui/bolio-ui/blob/main/CONTRIBUTING.MD) to learn how you can contribute to this project. export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { Text, Spacer } from 'core' export const meta = { title: 'LLMs.txt', description: 'Enable AI assistants like Claude Code, Cursor and Windsurf to understand Bolio UI, with the docs published as Markdown.', sidebar: 'guide', group: 'Guide' } ## LLMs.txt ### Available files We provide LLMs.txt files to make the Bolio UI documentation accessible to AI coding assistants. Every page is also available alone as Markdown, so an assistant reads the real props and examples instead of guessing them. Core documentation: - • [`/llms.txt`](/llms.txt): quick reference index, with one line per page - • [`/llms-full.txt`](/llms-full.txt): complete Bolio UI documentation For limited context windows: - • [`/llms-components.txt`](/llms-components.txt): components and hooks only - • [`/llms-guide.txt`](/llms-guide.txt): guides only, such as setup, themes and page structure A single page: - • `/md/components/button`: one page as Markdown. Use any section (`guide`, `components` or `hooks`) and page name. ### Claude Code Tell Claude to reference the documentation: ```text Use the Bolio UI documentation from https://bolio-ui.com/llms.txt ``` Or add the links to your project with [AGENTS.md](/docs/guide/agents-md), so Claude loads them on every session. ### Cursor Use the `@Docs` feature: ```text @Docs https://bolio-ui.com/llms-full.txt ``` ### Windsurf Add this line to your `.windsurfrules` file: ```text #docs https://bolio-ui.com/llms-full.txt ``` ### Other AI tools Most AI assistants can reference documentation by URL. Simply provide: ```text https://bolio-ui.com/llms.txt ``` For component and hook documentation only: ```text https://bolio-ui.com/llms-components.txt ``` For setup and guides only: ```text https://bolio-ui.com/llms-guide.txt ``` ### Contributing Found an issue with AI-generated code? Help us improve the LLMs.txt files by [opening an issue on GitHub](https://github.com/bolio-ui/bolio-ui/issues/new). export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { Spacer } from 'core' export const meta = { title: 'MCP Server', description: 'Access the Bolio UI documentation directly in your AI assistant, with the Bolio UI MCP Server.', sidebar: 'guide', group: 'Guide' } ## MCP Server The Bolio UI MCP Server gives AI assistants direct access to the documentation of every component, hook and guide, so they build with the real props and examples. It is published as `@bolio-ui/mcp` on npm and uses the stdio transport. It reads the same pages as [LLMs.txt](/docs/guide/llms-txt), so it needs no API key. ### Cursor Add to `.cursor/mcp.json`, or to `~/.cursor/mcp.json` to use it in every project: ```json { "mcpServers": { "bolio-ui": { "command": "npx", "args": ["-y", "@bolio-ui/mcp@latest"] } } } ``` ### Claude Code Run this command in your terminal: ```bash claude mcp add bolio-ui -- npx -y @bolio-ui/mcp@latest ``` Or add to the `.mcp.json` file of your project: ```json { "mcpServers": { "bolio-ui": { "command": "npx", "args": ["-y", "@bolio-ui/mcp@latest"] } } } ``` Restart Claude Code and run `/mcp`. When the server shows Connected, it is ready to use. ### Windsurf Add to `.windsurf/mcp.json`, then restart Windsurf: ```json { "mcpServers": { "bolio-ui": { "command": "npx", "args": ["-y", "@bolio-ui/mcp@latest"] } } } ``` ### Zed Add to your `settings.json`, then restart Zed. In the Agent Panel settings, the dot next to the server turns green when it is active: ```json { "context_servers": { "bolio-ui": { "command": "npx", "args": ["-y", "@bolio-ui/mcp@latest"], "env": {} } } } ``` ### VS Code Add to `.vscode/mcp.json`, then click Start next to the server: ```json { "servers": { "bolio-ui": { "type": "stdio", "command": "npx", "args": ["-y", "@bolio-ui/mcp@latest"] } } } ``` ### Codex Add to `~/.codex/config.toml`, or to `.codex/config.toml` in your project, then restart Codex and run `/mcp` to check it: ```toml [mcp_servers.bolio-ui] command = "npx" args = ["-y", "@bolio-ui/mcp@latest"] ``` ### OpenCode Add to `opencode.json`, then restart OpenCode: ```json { "$schema": "https://opencode.ai/config.json", "mcp": { "bolio-ui": { "type": "local", "command": ["npx", "-y", "@bolio-ui/mcp@latest"] } } } ``` ### Usage Once configured, ask your AI assistant questions like: - • "Show me all Bolio UI components" - • "What props does the Button component have?" - • "Give me an example of using the Modal component" - • "Help me install Bolio UI in my Vite app" - • "How do I customize the theme?" - • "Which hooks does Bolio UI have?" - • "What are the theme colors for dark mode?" ### Available tools | Tool | Description | | --------------------- | ---------------------------------------------------------------------------------------------------------------------- | | `list_components` | List all Bolio UI components, with a summary of each | | `list_hooks` | List all Bolio UI hooks, with a summary of each | | `get_component_docs` | Get the documentation of one or more components, including props, examples and usage | | `get_theme_variables` | Get the theme tokens (colors, font, layout, breakpoints and shadows) of the light theme, the dark theme or both | | `get_docs` | Get one page by path, such as `guide/getting-started` or `hooks/use-theme`. Without a path, returns the index of pages | ### Troubleshooting Requirements: Node.js 18 or higher. The package is downloaded by `npx` the first time the server starts. Something not working? Open an issue on [GitHub](https://github.com/bolio-ui/bolio-ui/issues/new). export default Docs.withMeta(meta) --- import Docs from 'src/templates/Docs' import { PackageTabs } from 'src/components' import { Spacer } from 'core' export const meta = { title: 'Migrating to v3', description: 'What changes in v3 and what to do about it, coming from v1 or from a v2 alpha.', sidebar: 'guide', group: 'Guide' } ## Migrating to v3 Version 3 drops the styled-jsx runtime: every component now ships plain, static CSS instead of injecting `