UI Kit
Production-grade UI primitives kit: themed buttons, dialog primitives, form controls, overlays, and application blocks — all tokenized, accessible, and ready to compose.
Inputs, Select, Textarea, Checkbox, Radio, Drawer, Dialog, Toast, Reports, and Blocks.
component families
palettes
documented examples
button variants
button sizes
Tailwind utilities
What it is
A drop-in UI primitives kit for shipping production product surfaces fast. Twelve component families, ten swappable palettes, sixty-plus documented examples, and a single tokenized design system that you copy into your app instead of pulling in as a heavyweight dependency.
Component families
- Buttons — one primitive, ten palettes (brand, teal, cyan, sky, emerald, violet, fuchsia, rose, amber, slate), five variants (solid, outline, soft, ghost, link), six sizes, icon-only states, button groups, split buttons, and floating action surfaces.
- Dialog primitives — Modal (center-docked with zoom+slide-from-bottom spring), Drawer (edges in from any side with momentum easing), SlidePanel (right-gutter focused panel), Bottom Sheet, Fullscreen Takeover, Alert, and a multi-step Wizard shell.
- Form controls — Inputs with validation, error states, masks, and auto-formatting; selects with searchable + multi-select; textareas with autosize; radio groups; checkboxes; toggle switches; ranges; segmented controls; and a tokenized field/label/help-text pattern.
- Feedback — Toasts (Sonner-driven), inline alerts, banner systems, status badges, and skeleton loaders.
- Data display — Tables with sort/select/pagination, list rows, definition lists, key-value blocks, and stat cards.
- Navigation — Tabs (line + segmented), breadcrumbs, command palettes, popover menus, dropdown menus, and contextual popovers.
- Layouts — Shell containers, split panels, sticky toolbars, and responsive grids.
- Disclosures — Accordion, collapsible, and expandable card patterns.
- Application blocks — Settings, empty states, activity, review, dashboards, filters, onboarding, profile, resources, messages, and commerce blocks — each one wired with state, motion, and tokens so you can drop a real surface, not a starter sketch.
- Report controls — Search, filters, sorting, column visibility, row selection, export, refresh, view modes, and pagination running on a mock pipeline dataset.
Theming
Ten palettes share one token contract. Every palette is fully expressed in declared Tailwind utilities — no style={}, no [#hex], no runtime CSS — so Tailwind's JIT keeps your bundle small. Light and dark are token-paired and ship side by side.
Motion
Dialogs use spring-tuned transitions through tw-animate-css + Radix data-state attributes. Drawer momentum, modal zoom-and-slide, bottom-sheet rubber-banding, and overlay fade are all handled with declarative classes — no JS motion library required.
Accessibility
Built on Radix primitives: focus trap, restore-on-close, scroll-locking, keyboard nav, and aria-labeling come built in. Every button, input, and overlay ships with proper roles and focus ring tokens.
What you get
- Full TypeScript source for every component family.
- A single
cnhelper, token map, and palette contract — no hidden config. - Documented examples for every variant, size, and state.
- Application-block compositions you can paste into a real app.
- Light and dark themes paired at the token level.
Highlights
Tech stack & dependencies
What the app is built on and what you'll need to run it.
- Component runtime, hooks for overlay state, and Radix slot composition
- Token contract, palette system, declarative animation classes, and zero-runtime styling
- Radix UIrequiredAccessible dialogs, selects, popovers, tabs, switches, checkboxes, radios, and dropdown menus
- Radix Slotrequired`asChild` polymorphic composition for buttons, links, and form controls
- Framer MotionrequiredTabs, component entrances, overlay motion, and control-state animation
- tw-animate-cssrequiredTailwind animation utilities for dialog spring transitions and overlay states
- lucide-reactrequiredDrop-in icon set used across buttons, form controls, and application blocks
- SonneroptionalToast notification examples and production toast surface
- clsxrequiredConditional class composition used by the `cn` helper that the kit ships with
- tailwind-mergerequiredResolves conflicting Tailwind utilities so palette overrides win predictably
Full breakdown
How it works
Code preview
import { Slot } from "@radix-ui/react-slot";
import { cn } from "@/lib/cn";
import type { ButtonHTMLAttributes, ReactNode } from "react";
type Palette =
| "brand" | "teal" | "cyan" | "sky" | "emerald"
| "violet" | "fuchsia" | "rose" | "amber" | "slate";
type Variant = "solid" | "outline" | "soft" | "ghost" | "link";
type Size = "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
palette?: Palette;
variant?: Variant;
size?: Size;
asChild?: boolean;
leadingIcon?: ReactNode;
trailingIcon?: ReactNode;
loading?: boolean;
};
const SIZE_CLASSES: Record<Size, string> = {
xs: "h-7 gap-1 rounded-full px-2.5 text-xs",
sm: "h-8 gap-1.5 rounded-full px-3 text-sm",
md: "h-9 gap-2 rounded-full px-4 text-sm",
lg: "h-10 gap-2 rounded-full px-5 text-sm",
xl: "h-12 gap-2.5 rounded-full px-6 text-base",
"2xl": "h-14 gap-3 rounded-full px-8 text-lg",
};
const VARIANT_CLASSES: Record<Palette, Record<Variant, string>> = {
brand: {
solid: "bg-brand-500 text-white hover:bg-brand-400 focus-visible:ring-brand-300",
outline: "border border-brand-500 text-brand-300 hover:bg-brand-500/10",
soft: "bg-brand-500/10 text-brand-200 hover:bg-brand-500/20",
ghost: "text-brand-300 hover:bg-brand-500/10",
link: "text-brand-300 underline-offset-4 hover:underline",
},
// …the other nine palettes share the same shape.
} as Record<Palette, Record<Variant, string>>;
export function Button({
palette = "brand",
variant = "solid",
size = "md",
asChild = false,
className,
leadingIcon,
trailingIcon,
loading,
children,
...props
}: ButtonProps) {
const Comp = asChild ? Slot : "button";
return (
<Comp
className={cn(
"inline-flex items-center justify-center font-semibold transition",
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
"disabled:cursor-not-allowed disabled:opacity-50",
SIZE_CLASSES[size],
VARIANT_CLASSES[palette][variant],
className,
)}
data-loading={loading || undefined}
{...props}
>
{leadingIcon}
{children}
{trailingIcon}
</Comp>
);
}FAQ
No. It started as a button and dialog kit, but the current demo includes form controls, feedback, data display, navigation, layouts, disclosures, application patterns, blocks, and report controls.