Getting started

How to add the library to an app, and what it expects from the app around it.

Browse the components library94 components, each with its variants, props and best practices.

Install

Each release is a GitHub Release with the packed library attached. Install a pinned version from its .tgz, and move up by changing the version.

bun add @leap-crm/design-system@https://github.com/zero-config-crm/LEAP-Design-System/releases/download/v0.1.0/leap-crm-design-system-0.1.0.tgz

Peer dependencies

The app provides one copy of each: React 19 and Motion, the CRM's versions.

bun add react@^19.3 react-dom@^19.3 motion@^14.5

Styles and font

Import the stylesheet once, at the app's root. It carries the theme's variables and the utilities the components use, without Tailwind's reset, which the app keeps. Components set Inter themselves; load Inter Variable in the app.

import "@leap-crm/design-system/styles.css";

Toasts

Mount one Toaster near the root, then call toast() from anywhere.

import { Toaster, toast } from "@leap-crm/design-system"; // <Toaster /> once, toast.success("Saved")

Using a component

Import from the package root; each component page shows its import, every variant and its props. A component marked Beta can still change in a minor release, and the release notes say when.

import { Button, SimpleTooltip } from "@leap-crm/design-system";

Building with an agent

The package carries its own docs for agents, matched to the installed version: llms.txt holds the rules for building a screen and an index of every component, and each component has a markdown page with its best practices, examples and props. Add this line to the app's AGENTS.md. The same files are served beside this site, at /llms.txt, and every page here names its markdown twin, like /components/button.md.

Before using @leap-crm/design-system, read node_modules/@leap-crm/design-system/dist/docs/llms.txt, then the page of each component you use.

Lint

The package ships the rules a screen built on it follows, as an oxlint plugin: tokens only, Truncate for clipped text, ScrollArea for scrolling, the focus style, h-dvh, and library components in place of bare buttons, inputs and hand-written widget roles. Every message names the fix. Add the plugin and the rules to the app's .oxlintrc.json.

"jsPlugins": ["@leap-crm/design-system/oxlint"], "rules": { "leap-ds/library-controls": "error", "leap-ds/tokens-only": "error", "leap-ds/truncate-with-tooltip": "error", "leap-ds/scroll-area-only": "error", "leap-ds/focus-style": "error", "leap-ds/no-static-viewport-height": "error" }

Contributing

AGENTS.md holds the rules every component follows: ui-sdk for behaviour, tokens only, the focus style, motion, truncation and scrolling. Lint and CI enforce them, and every change to the library carries a changeset (bun run changeset) that becomes its release note.

bun run dev · bun run test · bun run lint · bun run changeset