Tansy UI logo

Tansy UI

A themeable React component kit, with every state documented in Storybook.
By OpenKhalix.

--- Tansy UI is named after the tansy flower, also called *golden buttons*: many small, round heads that together read as one bloom. The kit works the same way. It is a set of small, owned parts (buttons, fields, selects, feedback and overlays) that combine into a consistent interface. Every part ships with: - **Named variants.** A short list of deliberate choices, such as `variant="outline"`, instead of one-off styling. - **Its states.** Error, disabled, loading and required are part of the component, and each has its own story. - **Tokens, not hex codes.** Colours come from a 50–900 palette ramp, so switching the palette re-themes every part without a code change. > **Status:** pre-release (v0.3.0). Tansy UI builds as a library (`npm run build:lib`) but is not published to npm yet. It is developed in this repository, with a landing page and a Storybook workshop as its showcase. ## Components Built on [Base UI](https://base-ui.com) for accessible behaviour, styled with Tailwind CSS v4. | Group | Components | |---|---| | Actions | `Button`, `IconButton`, `LinkButton`, `ToggleGroup`, `Toggle` | | Forms | `Field`, `Input`, `FeaturedInput`, `TextArea`, `FeaturedTextArea`, `NumberInput`, `Select`, `FeaturedSelect`, `Combobox`, `NativeSelect`, `Checkbox`, `CheckboxGroup`, `Radio`, `Switch`, `Slider` | | Overlays | `Dialog` (`Modal`), `AlertDialog`, `Drawer` (`Sheet`), `Popover`, `Tooltip`, `InfoTip`, `DropdownMenu` | | Navigation | `Tabs`, `Accordion`, `Breadcrumb`, `Pagination` | | Feedback | `Alert`, `Toast` (`Toaster`, `useToast`), `Spinner`, `Progress`, `Meter`, `Skeleton` | | Display | `Badge`, `CountBadge`, `Avatar`, `AvatarGroup`, `Kbd`, `Table` | | Layout | `Card`, `Separator` | Every component follows one API (see [`docs/CONVENTIONS.md`](docs/CONVENTIONS.md)): - `color` for meaning and `variant` for style; - `size` of `sm`, `md` or `lg`; - `startIcon` and `endIcon` as React nodes; - `label`, `description` and `error` on every field; - `value`, `defaultValue` and `onValueChange` for anything with a value. ## Usage ```css /* app.css */ @import "tailwindcss"; @import "tansy-ui/tokens.css"; @source "../node_modules/tansy-ui/dist-lib"; ``` ```tsx import { Mail } from 'lucide-react' import { Button, FeaturedInput, Select, Switch } from 'tansy-ui' export function InviteForm() { return (
} required />