Quick Start

Get started with Compose UI in your React project.

Compose UI is currently in beta.
You can start using it today—if you spot a bug or want to request a feature, please report it on GitHub Issues

Installation

Install Compose UI using your preferred package manager:

bash
npm i @lglab/compose-ui

CSS

Import the default styles and register Compose UI as a Tailwind source in your main CSS file. The @source directive ensures Tailwind scans the package for class names used by components.

Make sure to update the path to your node_modules folder accordingly

css
@import '@lglab/compose-ui/styles/default.css';
@source "../node_modules/@lglab/compose-ui";

Usage

Import components directly from the package:

tsx
import { Button } from '@lglab/compose-ui'

export function Example() {
  return <Button>Click me</Button>
}

Customizing

Override the default theme by setting CSS variables. See the Theming page for all available options.

css
@theme inline {
  --color-primary: oklch(48.8% 0.243 264.376);
}