# Tansy UI A themeable, accessible React component kit by [OpenKhalix](https://ui.openkhalix.com), built on [Base UI](https://base-ui.com) and Tailwind CSS v4. - **38 components:** forms with floating labels, selects and comboboxes, dialogs, drawers, menus, tabs, toasts, tables and more. - **Accessible:** keyboard support and screen-reader wiring from Base UI, visible focus rings, and every story checked with axe in light and dark mode. - **Themeable:** seven palettes switchable at runtime, class-based dark mode, and one semantic token set. - **One API:** `color`, `variant` and `size` on everything; `label`, `description` and `error` on every field; controlled or uncontrolled values. **Docs and live examples:** https://ui.openkhalix.com/docs/ ## Install ```bash npm install @openkhalix/tansy-ui ``` Needs React 19. `@base-ui/react`, `lucide-react`, `clsx` and `tailwind-merge` install with it. ## Add the styles Pick one of the two setups. ### With Tailwind CSS v4 (recommended) Import the tokens after Tailwind, and let Tailwind scan the package for the classes it uses: ```css /* app.css */ @import "tailwindcss"; @import "@openkhalix/tansy-ui/tokens.css"; @source "../node_modules/@openkhalix/tansy-ui/dist"; ``` Your own Tailwind utilities can then use the same tokens (`bg-surface`, `text-fg`, `bg-primary-500`). ### Without Tailwind Import the prebuilt stylesheet once, for example in your entry file: ```ts import '@openkhalix/tansy-ui/styles.css' ``` It contains the tokens, only the utilities the components use, and a modern CSS reset (Tailwind's preflight), which the components rely on, much as MUI relies on `CssBaseline`. The reset normalises margins, borders and form controls across your app. If you already use Tailwind, use the setup above instead. ## Use ```tsx import { Mail } from 'lucide-react' import { Button, FeaturedInput, Select, Switch } from '@openkhalix/tansy-ui' export function InviteForm() { return (
} required />