Getting started

Welcome to the NextUI documentation!

NextUI allows you make beautiful, modern, and fast websites/applications regardless of your design experience, created with React.js and Stitches, based on GeistUI and inspired by Vuesax.

Installation

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

yarn add @nextui-org/react
# or
npm i @nextui-org/react

Setup

For NextUI to work correctly, you need to set up the NextUIProvider at the root of your application.

Go to the root of your application and do this:

import * as React from 'react';

// 1. import `NextUIProvider` component
import { NextUIProvider } from '@nextui-org/react';

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

Next.js

Go to pages/_app.js or pages/_app.tsx (create if it doesn't exist) and add this:

// 1. import `NextUIProvider` component
import { NextUIProvider } from '@nextui-org/react';

function MyApp({ Component, pageProps }) {
  return (
    // 2. Use at the root of your app
    <NextUIProvider>
      <Component {...pageProps} />
    </NextUIProvider>
  );
}

export default MyApp;

Using NextUI components

Once NextUI is installed you can use any of the components as follows. NextUI 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 '@nextui-org/react';

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

Individual components import

import Button from '@nextui-org/react/button';

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

NextUIProvider Props

AttributeTypeAccepted valuesDescriptionDefault
themeNextUIThemesCreateThemeOptional custom theme, by default NextUI applies light theme-
disableBaselinebooleantrue/falseNextUI automatically includes <CssBaseline/>false

Typescript types

Create Theme

For more information you can see the Stitches theme documention

{
  "type": "light", // light / dark
  "theme": {
    "colors": {},
    "space": {},
    "fontSizes": {},
    "fonts": {},
    "fontWeights": {},
    "lineHeights": {},
    "letterSpacings": {},
    "sizes": {},
    "borderWidths": {},
    "borderStyles": {},
    "radii": {},
    "shadows": {},
    "zIndices": {},
    "transitions": {}
  }
}

Communnity

We're excited to see the community adopt NextUI, 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 NextUI are always welcome, please see our contribution guidelines to learn how you can contribute to this project.