Guide
Getting started
1. Install
ChibiUI requires React 19. Radix primitives and Motion come bundled as dependencies.
pnpm add @chibi-ui/react2. Add the styles
Option A: precompiled CSS. Works with any stack. It contains only the utilities the components use and no global reset, so it won’t restyle your app.
import '@chibi-ui/react/styles.css';Option B: Tailwind CSS v4. Import the theme and let Tailwind scan the package. Your app then shares one stylesheet, and you can use the tokens yourself (for example bg-chibi-primary).
@import "tailwindcss";
@import "@chibi-ui/react/theme.css";
@source "../node_modules/@chibi-ui/react/dist";3. Use a component
Import from per-component entry points to keep bundles small. Each one is marked "use client", so you can render it directly from React Server Components.
import { ChibiButton } from '@chibi-ui/react/button';
export default function Page() {
return <ChibiButton variant="kawaii">Hello, Mochi!</ChibiButton>;
}4. (Optional) Enable toasts
Mount ChibiToastProvider once near the root, then call useChibiToast() anywhere below it.
import { ChibiToastProvider } from '@chibi-ui/react/toast';
<body>
<ChibiToastProvider>{children}</ChibiToastProvider>
</body>5. (Optional) Fonts
The tokens ask for Fredoka (display) and Outfit (body), and fall back to rounded system fonts. The library never loads fonts itself. Self-host them, for example with next/font, and point the tokens at them:
:root {
--chibi-font-display: var(--font-fredoka), ui-rounded, system-ui, sans-serif;
--chibi-font-body: var(--font-outfit), system-ui, sans-serif;
}Quality guarantees
- WAI-ARIA patterns come from Radix UI, and every component is checked with axe-core in unit tests.
- Every semantic colour pairing is verified against WCAG AA (4.5:1 for text, 3:1 for UI) in CI.
- Motion respects
prefers-reduced-motion, and glass effects respectprefers-reduced-transparency. - Focus rings are outlines, so they stay visible in Windows forced-colours mode.
- TypeScript runs in strict mode with zero
any, and every component exports itsChibi*Propstype.