DocsComponentsTemplatesThemesGitHub

Installation

Pick your stack. React gets the components; everything else gets the tokens and CSS classes.

One command

Installs the package, imports the styles, and adds agent rules and the MCP server. Add --dry-run to preview.

npx @fruit-labs/design init

Install the package

npm install @fruit-labs/design

Next.js (App Router)

Import the CSS once in app/layout.tsx. The components are already marked as client components.

import '@fruit-labs/design/tokens.css';
import '@fruit-labs/design/styles.css';

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>{children}</body>
    </html>
  );
}

Vite, Remix, React Router

import '@fruit-labs/design/tokens.css';
import '@fruit-labs/design/styles.css';
import { ThemeProvider, Button, Toaster, toast } from '@fruit-labs/design';

export default function App() {
  return (
    <ThemeProvider theme="system">
      <Button icon="plus" onClick={() => toast({ title: 'Project created' })}>New project</Button>
      <Toaster />
    </ThemeProvider>
  );
}

Astro

---
import '@fruit-labs/design/tokens.css';
import '@fruit-labs/design/styles.css';
import { DatePicker } from '@fruit-labs/design';
---
<DatePicker client:load label="Start date" />

Copy the source (shadcn CLI)

The files land in components/fruit/ in your project, so you can change them.

# everything
npx shadcn@latest add https://design.fruitlabs.online/r/all.json

# one component and what it needs
npx shadcn@latest add https://design.fruitlabs.online/r/button.json

Vue, Svelte, Angular

Import the CSS and write the markup with the classes. Behaviour such as menus and focus trapping is yours to add.

import '@fruit-labs/design/tokens.css';
import '@fruit-labs/design/styles.css';
<button class="fd-btn fd-btn--filled">Continue</button>
<button class="fd-btn fd-btn--gray fd-btn--sm">Cancel</button>
<span class="fd-badge fd-badge--success"><span class="fd-badge-dot"></span>Active</span>
<div class="fd-input"><input placeholder="Search"></div>

Plain HTML, Django, Rails, Laravel, PHP

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fruit-labs/design/dist/tokens.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fruit-labs/design/dist/fruit.css">

<button class="fd-btn fd-btn--filled">Continue</button>

React from a script tag

<script src="https://cdn.jsdelivr.net/npm/react@18.3.1/umd/react.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/react-dom@18.3.1/umd/react-dom.production.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@fruit-labs/design/dist/fruit-design.umd.js"></script>
<div id="app"></div>
<script>
  const h = React.createElement, { Button } = window.FruitDesign;
  ReactDOM.createRoot(document.getElementById('app')).render(h(Button, null, 'Hello'));
</script>

Font

Fruit Design uses DM Sans and falls back to the system font.

<link href="https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400..800&display=swap" rel="stylesheet">