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.

Install

Inside your React project directory, install Bolio UI by running either of the following:

yarn add @bolio-ui/core

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:

/src/app.js
import * as React from 'react'

// 1. import `BolioUIProvider` and `CssBaseline`
import { BolioUIProvider, CssBaseline } from '@bolio-ui/core'

function App({ Component }) {
  // 2. Use at the root of your app
  return (
    <BolioUIProvider>
      <CssBaseline />
      <Component />
    </BolioUIProvider>
  )
}

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.

// 1. import `BolioUIProvider` and `CssBaseline`
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

The Pages Router doesn't need a custom _document, Next.js already adds the styles to the HTML.

For more information about Next.js + Bolio UI SSR check out the documentation.

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.

import { Button } from '@bolio-ui/core'

const Component = () => <Button>Click me</Button>

APIs

BolioUIProvider.Props

AttributeTypeAccepted valuesDescriptionDefault
themesArray<BolioUIThemes>-Custom themes added to the default light and dark themes-
themeTypestringlight, dark or the type of a custom themeTheme applied to every componentlight
Edit this page on GitHub

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!

Contributing

PR's on Bolio UI are always welcome, please see our contribution guidelines to learn how you can contribute to this project.