# Vantu UI > React design system for AI-powered SaaS dashboards: 70 components, 15 blocks, 10 charts and 8 templates. React 19, Tailwind CSS v4, React Aria. Every item is copy-in source you own; install any of them with the shadcn CLI from its registry address. Full docs for every item in one file: https://vantu-ui.vercel.app/llms-full.txt Registry index: https://vantu-ui.vercel.app/r/registry.json Base (tokens + cx helper, installed automatically as a dependency): https://vantu-ui.vercel.app/r/vantu-base.json ## Docs - [Introduction](https://vantu-ui.vercel.app/docs): What Vantu UI is and how it is organised. - [Installation](https://vantu-ui.vercel.app/docs/installation): Theme tokens, the cx helper and your first component. - [Using with AI](https://vantu-ui.vercel.app/docs/ai): llms.txt, registry addresses and prompts for coding assistants. - [Agent skill](https://vantu-ui.vercel.app/docs/agent-skill): A Claude Code skill and always-on rules for other agents. - [Color](https://vantu-ui.vercel.app/foundations/colors), [Typography](https://vantu-ui.vercel.app/foundations/typography), [Spacing & radius](https://vantu-ui.vercel.app/foundations/spacing): Design tokens. ## Components - [Button](https://vantu-ui.vercel.app/components/button): Primary, secondary, ghost and danger actions in three sizes, with optional leading or trailing icons and a pending state. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/button.json` - [Icon Button](https://vantu-ui.vercel.app/components/icon-button): Compact square action for toolbars, topbars and table rows. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/icon-button.json` - [Menu](https://vantu-ui.vercel.app/components/menu): Row actions and dropdown menus with 36px items, 16px icons and optional shortcuts. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/menu.json` - [Filter](https://vantu-ui.vercel.app/components/filter): Toolbar filter trigger (muted label + value + chevron) and a dashed “Add filter” button. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/filter.json` - [Input](https://vantu-ui.vercel.app/components/input): Text field, 40px tall. Focus swaps the border to accent and adds a 3px ring. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/input.json` - [Select](https://vantu-ui.vercel.app/components/select): Single-value dropdown with a trailing chevron and keyboard navigation. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/select.json` - [Textarea](https://vantu-ui.vercel.app/components/textarea): Multiline field, 14 Regular at 140% line height, minimum 96px tall. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/textarea.json` - [Checkbox](https://vantu-ui.vercel.app/components/checkbox): 16px checkbox with checked, indeterminate and disabled states. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/checkbox.json` - [Radio](https://vantu-ui.vercel.app/components/radio): 16px radio buttons in a labelled group. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/radio.json` - [Switch](https://vantu-ui.vercel.app/components/switch): 40 × 24 track with a 16px knob and 4px inset. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/switch.json` - [Chip & Kbd](https://vantu-ui.vercel.app/components/chip): 32px selectable and removable tokens for criteria builders and tag editors, plus keyboard keys. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/chip.json` - [Badge](https://vantu-ui.vercel.app/components/badge): Six tones × two styles. Soft is a tinted status or category. Dot is a neutral surface with a tone dot for workflow status. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/badge.json` - [Counter](https://vantu-ui.vercel.app/components/counter): Navigation and tab counts. 20px pill, 12 Medium. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/counter.json` - [Avatar](https://vantu-ui.vercel.app/components/avatar): People are circular initials on a soft tint (24 in tables, 32 in lists, 40 in headers). Companies are square marks. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/avatar.json` - [Score Meter](https://vantu-ui.vercel.app/components/score-meter): AI score as 10 ticks plus the value. ≥ 80 hot (green), 60–79 warm (amber), < 60 cold (gray). Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/score-meter.json` - [Delta & Metric](https://vantu-ui.vercel.app/components/metric): Delta is a trend glyph and value in the semantic tone. Metric is label, 32 SemiBold value, delta and caption. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/metric.json` - [Progress Bar](https://vantu-ui.vercel.app/components/progress-bar): 4px track for usage, quotas and rates. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/progress-bar.json` - [Card](https://vantu-ui.vercel.app/components/card): Layered card: a subtle shell (radius 16, 4px padding) holding a header and an inner white panel. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/card.json` - [Timeline](https://vantu-ui.vercel.app/components/timeline): Items connect with a 1px rail; the last item drops the rail. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/timeline.json` - [Description List](https://vantu-ui.vercel.app/components/description-list): Key/value rows inside a plain card (white, 1px border, radius 16, padding 20) for details and settings. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/description-list.json` - [Brand & Integration Marks](https://vantu-ui.vercel.app/components/integration-mark): Product lockup, wordmark and mark in two sizes, 24px integration tiles and social sign-in buttons. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/integration-mark.json` - [Nav Item](https://vantu-ui.vercel.app/components/nav-item): Sidebar link with optional muted count or unread badge, plus uppercase section labels. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/nav-item.json` - [Tabs](https://vantu-ui.vercel.app/components/tabs): Underline tabs with a 2px text-primary indicator. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/tabs.json` - [Segmented Control](https://vantu-ui.vercel.app/components/segmented-control): Compact single choice for ranges such as 7D · 30D · 90D. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/segmented-control.json` - [Pagination](https://vantu-ui.vercel.app/components/pagination): Table footer. Summary left, pages right; 32px page items, radius 8. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/pagination.json` - [Modal & Drawer](https://vantu-ui.vercel.app/components/modal): Shared header and footer parts. Modal is 560px wide; drawer is 480px wide, full height, docked right. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/modal.json` - [Tooltip](https://vantu-ui.vercel.app/components/tooltip): Dark 12 Medium bubble, radius 8, raised shadow. One line, no arrow. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/tooltip.json` - [AI Search](https://vantu-ui.vercel.app/components/ai-search): The one prominent control on AI screens: 64px bar, natural-language query in 16 Regular and a Large primary action. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/ai-search.json` - [Criterion Chip](https://vantu-ui.vercel.app/components/criterion-chip): Structured criterion produced by AI search: muted key + value, removable. 32px, radius 12. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/criterion-chip.json` - [Sequence Step](https://vantu-ui.vercel.app/components/sequence-step): One card per step: channel tile, title, timing meta, content preview and optional stats. Channels: email · LinkedIn · call · task. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/sequence-step.json` - [Link Button](https://vantu-ui.vercel.app/components/link-button): Inline text action in gray, black, accent or error, with optional underline and icons. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/link-button.json` - [Button Group](https://vantu-ui.vercel.app/components/button-group): Joined buttons sharing one border — view switches, ranges and formatting toolbars. Three sizes. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/button-group.json` - [Slider](https://vantu-ui.vercel.app/components/slider): Single value or range on a 6px track, with the value beside the label or in a tooltip. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/slider.json` - [File Upload](https://vantu-ui.vercel.app/components/file-upload): Drop area with a browse button, and file cards for uploading, completed and failed states. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/file-upload.json` - [Choice Card](https://vantu-ui.vercel.app/components/choice-card): Radio group rendered as selectable cards for roles, plans and onboarding choices. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/choice-card.json` - [Setting Row](https://vantu-ui.vercel.app/components/setting-row): Title, description and a control — inline or leading — grouped under setting sections. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/setting-row.json` - [Tag](https://vantu-ui.vercel.app/components/tag): 24px label with an icon, avatar, company mark or flag; stroke or gray, removable. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/tag.json` - [Circular Progress](https://vantu-ui.vercel.app/components/circular-progress): Ring progress for completion and a semicircle gauge for balances and goals. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/circular-progress.json` - [Step Indicator](https://vantu-ui.vercel.app/components/step-indicator): Numbered steps — horizontal with chevrons for headers, vertical for checklists — plus dot steppers. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/step-indicator.json` - [Accordion](https://vantu-ui.vercel.app/components/accordion): Disclosure rows with a +/× toggle; the open item becomes a raised white card. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/accordion.json` - [Banner](https://vantu-ui.vercel.app/components/banner): Full-width announcement above the app shell — trials, outages and launches. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/banner.json` - [Close Button](https://vantu-ui.vercel.app/components/close-button): Dismiss control for dialogs, toasts, tags and banners — ghost or filled, three sizes. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/close-button.json` - [Search Field](https://vantu-ui.vercel.app/components/search-field): Search input with a leading icon, a clear button and Escape-to-clear; optional shortcut hint. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/search-field.json` - [Combobox](https://vantu-ui.vercel.app/components/combobox): Text input with a filtered list of suggestions — type to filter, arrows to move, Enter to pick. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/combobox.json` - [Number Field](https://vantu-ui.vercel.app/components/number-field): Numeric input with −/+ steppers, arrow keys, min/max and locale-aware currency or percent formatting. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/number-field.json` - [Input OTP](https://vantu-ui.vercel.app/components/input-otp): One-time code input: one box per character with auto-advance, backspace, arrows and paste. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/input-otp.json` - [Token Input](https://vantu-ui.vercel.app/components/token-input): Free-form multi-value field: Enter, comma or paste creates tokens; Backspace removes the last. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/token-input.json` - [Color Picker](https://vantu-ui.vercel.app/components/color-picker): Swatch trigger opening a saturation area, hue slider, hex field and preset swatches. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/color-picker.json` - [Date Calendar](https://vantu-ui.vercel.app/components/date-calendar): Month grid for a single date or a range, with unavailable dates and a today marker. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/date-calendar.json` - [Date Picker](https://vantu-ui.vercel.app/components/date-picker): Typed date segments plus a calendar popover — fully keyboard accessible and locale aware. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/date-picker.json` - [Time Field](https://vantu-ui.vercel.app/components/time-field): Hour and minute segments you type or arrow through, 12 or 24-hour. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/time-field.json` - [Table](https://vantu-ui.vercel.app/components/table): Base table parts — sortable columns, selectable rows, header 40 on subtle, rows 48, horizontal rules only. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/table.json` - [Tag Group](https://vantu-ui.vercel.app/components/tag-group): Keyboard-navigable set of tags with single or multiple selection and removal. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/tag-group.json` - [Tree View](https://vantu-ui.vercel.app/components/tree-view): Nested, expandable hierarchy with folder icons, counts and keyboard navigation. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/tree-view.json` - [Meter](https://vantu-ui.vercel.app/components/meter): A known quantity within a range — storage, quota, strength — as a bar or segments, colored by thresholds. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/meter.json` - [Divider](https://vantu-ui.vercel.app/components/divider): Horizontal or vertical rule with an optional inline label. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/divider.json` - [Carousel](https://vantu-ui.vercel.app/components/carousel): Scroll-snap slides with arrows and dots; swipe, drag or use the keyboard. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/carousel.json` - [Breadcrumb](https://vantu-ui.vercel.app/components/breadcrumb): Path trail with chevron or slash separators and collapsing middle levels. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/breadcrumb.json` - [Popover](https://vantu-ui.vercel.app/components/popover): Non-modal floating panel anchored to a trigger, with optional title and arrow. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/popover.json` - [Context Menu](https://vantu-ui.vercel.app/components/context-menu): Right-click menu anchored at the pointer; Shift+F10 or the Menu key for keyboard users. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/context-menu.json` - [Command Palette](https://vantu-ui.vercel.app/components/command-palette): ⌘K modal search over grouped commands with shortcuts and keyboard hints. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/command-palette.json` - [Spinner](https://vantu-ui.vercel.app/components/spinner): Indeterminate loading indicator in four sizes and three tones. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/spinner.json` - [Notification](https://vantu-ui.vercel.app/components/notification): Feed item for a notification center: who did what, when, with quotes and actions. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/notification.json` - [Announcement](https://vantu-ui.vercel.app/components/announcement): Dismissible product-news card, plus the inline “New · …” pill for hero sections. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/announcement.json` - [Alert](https://vantu-ui.vercel.app/components/alert): Inline alert for sync issues, limits and compliance notes. Four tones plus feature, three styles (soft, solid, outline) and two sizes. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/alert.json` - [Toast](https://vantu-ui.vercel.app/components/toast): Bottom-right confirmation, 400px. Tone icon, title, description and optional action. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/toast.json` - [AI Insight](https://vantu-ui.vercel.app/components/ai-insight): Eyebrow, concise headline and reason. The compact form fits one line in tables and toolbars. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/ai-insight.json` - [Progress Steps](https://vantu-ui.vercel.app/components/progress-steps): Named AI steps: done (green check), active (accent loader), pending (dashed circle). Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/progress-steps.json` - [Skeleton](https://vantu-ui.vercel.app/components/skeleton): Realistic placeholders that mirror the loaded layout. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/skeleton.json` - [Empty State](https://vantu-ui.vercel.app/components/empty-state): Say what is empty, why, and the next step. One primary action. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/empty-state.json` ## Blocks - [Sidebar](https://vantu-ui.vercel.app/blocks/sidebar): Workspace selector, quick actions, grouped navigation, credit usage and profile. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/sidebar.json` - [Page Title Bar](https://vantu-ui.vercel.app/blocks/page-title-bar): 88px header: avatar or ringed icon, title + description, search/notification utilities and actions. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/page-title-bar.json` - [Topbar](https://vantu-ui.vercel.app/blocks/topbar): Breadcrumb and help/notification actions, 60px tall. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/topbar.json` - [Page Header](https://vantu-ui.vercel.app/blocks/page-header): Title (24 SemiBold, optional badge), description and actions — secondary before primary, one primary per view. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/page-header.json` - [Metrics Strip](https://vantu-ui.vercel.app/blocks/metrics-strip): KPI cells with deltas and sparkbars in one card. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/metrics-strip.json` - [Prospects Table](https://vantu-ui.vercel.app/blocks/prospects-table): AI-ranked prospects with buying signals, score meters and row actions. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/prospects-table.json` - [Data Table](https://vantu-ui.vercel.app/blocks/data-table): Generic table block: saved-view tabs, search and filters, selection bar with bulk actions, sortable selectable rows and pagination. Columns and views come in as props. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/data-table.json` - [AI Search Panel](https://vantu-ui.vercel.app/blocks/ai-search-panel): AI search, parsed criteria chips, an insight and named progress steps. Submit to replay the steps. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/ai-search-panel.json` - [Sequence Flow](https://vantu-ui.vercel.app/blocks/sequence-flow): Vertical flow: enrollment → step cards → wait pills on a 1px connector → add step. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/sequence-flow.json` - [Activity Feed](https://vantu-ui.vercel.app/blocks/activity-feed): Recent workspace activity on a timeline rail. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/activity-feed.json` - [Performance Chart](https://vantu-ui.vercel.app/blocks/performance-chart): Stacked bar chart in plain SVG with KPI header and range control. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/performance-chart.json` - [Sequence Performance](https://vantu-ui.vercel.app/blocks/sequence-performance): Reply rate per sequence, with below-average rows in gray. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/sequence-performance.json` - [Usage Card](https://vantu-ui.vercel.app/blocks/usage-card): Plan usage for the current billing cycle. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/usage-card.json` - [Command Menu](https://vantu-ui.vercel.app/blocks/command-menu): ⌘K palette with search, grouped results and keyboard hints. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/command-menu.json` - [Sign In](https://vantu-ui.vercel.app/blocks/sign-in): Authentication card with social sign-in and email + password. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/sign-in.json` ## Charts - [Area Chart](https://vantu-ui.vercel.app/charts/area-chart): Single-series trend with a gradient fill, optional dashed prior-period line, crosshair tooltip and arrow-key scrubbing. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/area-chart.json` - [Line Chart](https://vantu-ui.vercel.app/charts/line-chart): Up to 6 series on one shared axis. Legend always on; ≤ 4 series are also labeled at the line end, with collision nudging. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/line-chart.json` - [Bar Chart](https://vantu-ui.vercel.app/charts/bar-chart): Vertical bars, grouped by series, with 4px rounded data ends, 2px gaps and a full-band hover target per category. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/bar-chart.json` - [Stacked Bar Chart](https://vantu-ui.vercel.app/charts/stacked-bar-chart): Composition over time: segments stacked with 2px surface gaps, only the top segment rounded, and a total in the tooltip. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/stacked-bar-chart.json` - [Horizontal Bar Chart](https://vantu-ui.vercel.app/charts/horizontal-bar-chart): Ranked list with bars — HTML rows so long names wrap, values right-aligned, and leaders highlighted against gray. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/horizontal-bar-chart.json` - [Donut Chart](https://vantu-ui.vercel.app/charts/donut-chart): Part-to-whole for ≤ 6 parts. Center shows the total or the hovered slice's share; the legend carries value and percent. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/donut-chart.json` - [Radial Chart](https://vantu-ui.vercel.app/charts/radial-chart): One headline value against a goal: a 240° gauge with an optional pacing target and an on-pace / behind badge. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/radial-chart.json` - [Funnel Chart](https://vantu-ui.vercel.app/charts/funnel-chart): Stage-to-stage conversion with centered bars, step rates between stages and the biggest drop-off called out. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/funnel-chart.json` - [Heatmap](https://vantu-ui.vercel.app/charts/heatmap): Magnitude across two dimensions on a six-step sequential accent ramp, with per-cell tooltips and keyboard focus. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/heatmap.json` - [Sparkline](https://vantu-ui.vercel.app/charts/sparkline): Word-sized trend for KPI tiles and table cells. Shape only — always pair it with the number it summarizes. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/sparkline.json` ## Templates - [Home Dashboard](https://vantu-ui.vercel.app/templates#home-dashboard): CRM dashboard: revenue and pipeline KPIs, revenue trend, deals closing soon, pipeline by stage, tasks, rep leaderboard and activity. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/home-dashboard.json` - [All Prospects](https://vantu-ui.vercel.app/templates#prospects): App shell, page header with import/add actions and the full data table with views, filters, bulk actions and pagination. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/prospects.json` - [Team Dashboard](https://vantu-ui.vercel.app/templates#team-dashboard): Greeting header, meetings-goal gauge, team availability, current campaign, notes and a schedule column with day picker. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/team-dashboard.json` - [Calendar](https://vantu-ui.vercel.app/templates#calendar): Week view with status summary cards, filter tabs with counts and a time grid of positioned events. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/calendar.json` - [Team Members](https://vantu-ui.vercel.app/templates#team-members): Members directory: segmented status filter, search, sortable selectable table with presence, documents and per-page pagination. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/team-members.json` - [Settings](https://vantu-ui.vercel.app/templates#settings): Top tabs, a left sub-menu card and a constrained form column — General, Profile and Notifications are wired up. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/settings.json` - [Sign In (split)](https://vantu-ui.vercel.app/templates#sign-in-split): Form on the left with social sign-in; a rotating product showcase on the right. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/sign-in-split.json` - [Onboarding](https://vantu-ui.vercel.app/templates#onboarding): Five-step flow with a header step indicator, choice cards and a summary. Install: `npx shadcn@latest add https://vantu-ui.vercel.app/r/onboarding.json` --- ## Button (component: Actions) Primary, secondary, ghost and danger actions in three sizes, with optional leading or trailing icons and a pending state. Docs: https://vantu-ui.vercel.app/components/button Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/button.json npm: lucide-react, react-aria-components Props: - `variant`: "primary" | "secondary" | "ghost" | "danger" | "neutral" | "soft" | "outline" | "danger-soft" = "secondary" — Visual style. - `size`: "2xs" | "xs" | "sm" | "md" | "lg" = "md" — Height: 28, 32, 36, 40 or 44px. - `leadingIcon`: ReactNode — Icon before the label. - `trailingIcon`: ReactNode — Icon after the label. - `iconOnly`: boolean = false — Square button. Pass the icon as children. - `isPending`: boolean = false — Shows a spinner and blocks presses. - `isDisabled`: boolean = false — Disables the button. - `onPress`: (e: PressEvent) => void — Called on click, tap or keyboard activation. ```tsx title="src/components/ui/button.tsx" "use client"; import { Loader2 } from "lucide-react"; import type { ReactNode } from "react"; import { Button as AriaButton, type ButtonProps as AriaButtonProps } from "react-aria-components"; import { cx } from "@/utils/cx"; export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "neutral" | "soft" | "outline" | "danger-soft"; export type ButtonSize = "2xs" | "xs" | "sm" | "md" | "lg"; export interface ButtonProps extends Omit { variant?: ButtonVariant; size?: ButtonSize; /** Icon rendered before the label. */ leadingIcon?: ReactNode; /** Icon rendered after the label. */ trailingIcon?: ReactNode; /** Square button with only an icon. Requires `aria-label`. */ iconOnly?: boolean; className?: string; children?: ReactNode; } const base = "group relative inline-flex shrink-0 cursor-default select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-base font-medium outline-none transition-[background,box-shadow,color] duration-150 " + "data-focus-visible:ring-3 data-focus-visible:ring-accent/25 " + "data-disabled:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"; const variants: Record = { primary: "bg-linear-to-b from-accent-light to-accent text-fg-inverse shadow-button-primary " + "data-hovered:from-accent data-hovered:to-accent-hover data-pressed:from-accent-pressed data-pressed:to-accent-pressed " + "data-disabled:bg-none data-disabled:bg-muted data-disabled:text-fg-disabled data-disabled:shadow-none", secondary: "bg-surface text-fg shadow-button data-hovered:bg-subtle data-pressed:bg-active " + "data-disabled:bg-muted data-disabled:text-fg-disabled data-disabled:shadow-none [&_svg]:text-fg-secondary", ghost: "text-fg data-hovered:bg-muted data-pressed:bg-active data-disabled:text-fg-disabled [&_svg]:text-fg-secondary", danger: "bg-error text-fg-inverse data-hovered:bg-error-hover data-pressed:bg-error-text " + "data-disabled:bg-muted data-disabled:text-fg-disabled", // Dark filled — for high-emphasis actions on light surfaces when accent would compete. neutral: "bg-inverse text-fg-inverse shadow-[0_1px_2px_rgb(0_0_0/0.12),inset_0_1px_0_rgb(255_255_255/0.08)] data-hovered:bg-fg/90 data-pressed:bg-fg/80 " + "data-disabled:bg-muted data-disabled:text-fg-disabled data-disabled:shadow-none", // Accent "lighter" — tinted, no shadow. soft: "bg-accent-soft text-accent-text data-hovered:bg-accent-soft-border data-pressed:bg-accent-soft-border " + "data-disabled:bg-muted data-disabled:text-fg-disabled", // Accent stroke on white. outline: "bg-surface text-accent-text shadow-[inset_0_0_0_1px_var(--color-accent-soft-border)] data-hovered:bg-accent-soft data-pressed:bg-accent-soft-border " + "data-disabled:bg-muted data-disabled:text-fg-disabled data-disabled:shadow-none", "danger-soft": "bg-error-soft text-error-text data-hovered:bg-error-border data-pressed:bg-error-border " + "data-disabled:bg-muted data-disabled:text-fg-disabled", }; // Heights: 28 / 32 / 36 / 40 / 44 (size/button-sm|md|lg plus compact sizes). Padding tightens on the icon side. const sizes: Record = { "2xs": { base: "h-7 gap-1 rounded-sm px-2 text-sm [&_svg]:size-3.5", lead: "pl-1.5", trail: "pr-1.5", icon: "size-7 px-0" }, xs: { base: "h-8 gap-1.5 rounded-[10px] px-2.5", lead: "pl-2", trail: "pr-2", icon: "size-8 px-0" }, sm: { base: "h-9 px-3", lead: "pl-2", trail: "pr-2.5", icon: "size-9 px-0" }, md: { base: "h-10 px-4", lead: "pl-3", trail: "pr-3", icon: "size-10 px-0" }, lg: { base: "h-11 px-5", lead: "pl-4", trail: "pr-4", icon: "size-11 px-0" }, }; export function Button({ variant = "secondary", size = "md", leadingIcon, trailingIcon, iconOnly, isPending, className, children, ...props }: ButtonProps) { const s = sizes[size]; return ( {isPending ? : leadingIcon} {iconOnly ? (isPending ? null : children) : children} {!iconOnly && trailingIcon} ); } ``` ## Icon Button (component: Actions) Compact square action for toolbars, topbars and table rows. Docs: https://vantu-ui.vercel.app/components/icon-button Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/icon-button.json npm: react-aria-components Props: - `aria-label`: string — Required accessible name. - `variant`: "secondary" | "ghost" = "secondary" — Raised or flat. - `size`: "xs" | "sm" | "md" = "md" — 28, 32 or 36px. ```tsx title="src/components/ui/icon-button.tsx" "use client"; import type { ReactNode } from "react"; import { Button as AriaButton, type ButtonProps as AriaButtonProps } from "react-aria-components"; import { cx } from "@/utils/cx"; export interface IconButtonProps extends Omit { /** Accessible name — icon buttons have no visible text. */ "aria-label": string; variant?: "secondary" | "ghost"; size?: "xs" | "sm" | "md"; className?: string; children: ReactNode; } const sizes = { xs: "size-7 rounded-sm", sm: "size-8 rounded-sm", md: "size-9 rounded-[10px]" }; /** Compact square action used in toolbars, topbars and table rows. */ export function IconButton({ variant = "secondary", size = "md", className, children, ...props }: IconButtonProps) { return ( {children} ); } ``` ## Menu (component: Actions) Row actions and dropdown menus with 36px items, 16px icons and optional shortcuts. Docs: https://vantu-ui.vercel.app/components/menu Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/menu.json npm: react-aria-components Props: - `icon`: ReactNode — MenuItem: leading icon. - `shortcut`: string — MenuItem: keyboard hint shown on the right. - `danger`: boolean — MenuItem: destructive styling. - `onAction`: (key: Key) => void — Menu: called with the item id. ```tsx title="src/components/ui/menu.tsx" "use client"; import type { ReactNode } from "react"; import { Menu as AriaMenu, MenuItem as AriaMenuItem, type MenuItemProps as AriaMenuItemProps, type MenuProps as AriaMenuProps, MenuTrigger, Popover, Separator, } from "react-aria-components"; import { cx } from "@/utils/cx"; import { Kbd } from "./kbd"; export { MenuTrigger }; export function Menu({ className, ...props }: Omit, "className"> & { className?: string }) { return ( ); } export interface MenuItemProps extends Omit { icon?: ReactNode; shortcut?: string; danger?: boolean; children: ReactNode; className?: string; } /** 36px items, radius 8, 16px icon, optional shortcut. */ export function MenuItem({ icon, shortcut, danger, children, className, ...props }: MenuItemProps) { const textValue = props.textValue ?? (typeof children === "string" ? children : undefined); return ( {icon} {children} {shortcut && {shortcut}} ); } export function MenuSeparator() { return ; } ``` ```tsx title="src/components/ui/kbd.tsx" import { cx } from "@/utils/cx"; /** Marks keyboard shortcuts. */ export function Kbd({ className, children }: { className?: string; children: React.ReactNode }) { return ( {children} ); } ``` ## Filter (component: Actions) Toolbar filter trigger (muted label + value + chevron) and a dashed “Add filter” button. Docs: https://vantu-ui.vercel.app/components/filter Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/filter.json npm: lucide-react, react-aria-components Props: - `label`: string — Muted label, e.g. “Owner”. - `value`: ReactNode — Current value. ```tsx title="src/components/ui/filter.tsx" "use client"; import { ChevronDown, Plus } from "lucide-react"; import type { ReactNode } from "react"; import { Button as AriaButton, type ButtonProps } from "react-aria-components"; import { cx } from "@/utils/cx"; export interface FilterButtonProps extends Omit { label: string; value: ReactNode; className?: string; } /** Toolbar filter: muted label + value + chevron. */ export function FilterButton({ label, value, className, ...props }: FilterButtonProps) { return ( {label} {value} ); } /** Add style is a dashed ghost trigger. */ export function AddFilterButton({ className, children = "Add filter", ...props }: Omit & { className?: string; children?: ReactNode }) { return ( {children} ); } ``` ## Input (component: Forms) Text field, 40px tall. Focus swaps the border to accent and adds a 3px ring. Docs: https://vantu-ui.vercel.app/components/input Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/input.json npm: react-aria-components Props: - `label`: string — Visible label. - `description`: string — Helper text under the field. - `errorMessage`: string — Marks the field invalid and shows the message. - `icon`: ReactNode — Leading icon. - `trailing`: ReactNode — Trailing content, e.g. a Kbd. - `isDisabled`: boolean — Disables the field. ```tsx title="src/components/ui/input.tsx" "use client"; import type { ReactNode } from "react"; import { Group, Input as AriaInput, TextField, type TextFieldProps, } from "react-aria-components"; import { cx } from "@/utils/cx"; import { Description, ErrorMessage, Label, fieldBase } from "./field"; export interface InputProps extends Omit { label?: string; description?: string; errorMessage?: string; placeholder?: string; /** 16px icon rendered inside the field, before the text. */ icon?: ReactNode; /** Content rendered at the end of the field, e.g. a . */ trailing?: ReactNode; className?: string; inputClassName?: string; } export function Input({ label, description, errorMessage, placeholder, icon, trailing, className, inputClassName, ...props }: InputProps) { const hasAdornment = Boolean(icon || trailing); return ( {label && } {hasAdornment ? ( svg]:size-4 [&>svg]:shrink-0 [&>svg]:text-fg-muted")}> {icon} {trailing} ) : ( )} {description && !errorMessage && {description}} {errorMessage} ); } ``` ```tsx title="src/components/ui/field.tsx" "use client"; import type { ReactNode } from "react"; import { FieldError, Label as AriaLabel, Text } from "react-aria-components"; import { cx } from "@/utils/cx"; /** Shared field chrome: 40px tall, radius 12, 1px border-strong, accent border + 3px ring on focus. */ export const fieldBase = "w-full rounded-md border border-line-strong bg-surface text-base text-fg outline-none transition-[border,box-shadow] " + "placeholder:text-fg-muted data-hovered:border-fg-disabled " + "data-focused:border-accent data-focused:shadow-focus data-focus-within:border-accent data-focus-within:shadow-focus " + "data-invalid:border-error data-invalid:data-focused:shadow-focus-error " + "data-disabled:border-line data-disabled:bg-subtle data-disabled:text-fg-disabled data-disabled:placeholder:text-fg-disabled"; export function Label({ className, children }: { className?: string; children: ReactNode }) { return {children}; } export function Description({ children }: { children: ReactNode }) { return ( {children} ); } export function ErrorMessage({ children }: { children?: ReactNode }) { return {children}; } ``` ## Select (component: Forms) Single-value dropdown with a trailing chevron and keyboard navigation. Docs: https://vantu-ui.vercel.app/components/select Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/select.json npm: lucide-react, react-aria-components Props: - `label`: string — Visible label. - `placeholder`: string = "Select an option" — Shown with no selection. - `selectedKey`: Key — Controlled value. - `onSelectionChange`: (key: Key) => void — Called when the value changes. ```tsx title="src/components/ui/select.tsx" "use client"; import { Check, ChevronDown } from "lucide-react"; import type { ReactNode } from "react"; import { Button as AriaButton, ListBox, ListBoxItem, type ListBoxItemProps, Popover, Select as AriaSelect, type SelectProps as AriaSelectProps, SelectValue, } from "react-aria-components"; import { cx } from "@/utils/cx"; import { Description, ErrorMessage, Label, fieldBase } from "./field"; export interface SelectProps extends Omit, "children" | "className"> { label?: string; description?: string; errorMessage?: string; items?: Iterable; className?: string; children: ReactNode | ((item: T) => ReactNode); } /** Single-value dropdown. Trailing chevron, accent border while open. */ export function Select({ label, description, errorMessage, items, className, children, placeholder = "Select an option", ...props }: SelectProps) { return ( {label && } {description && !errorMessage && {description}} {errorMessage} {children} ); } export function SelectItem({ className, children, ...props }: ListBoxItemProps & { children: ReactNode; className?: string }) { const textValue = props.textValue ?? (typeof children === "string" ? children : undefined); return ( {children} ); } ``` ```tsx title="src/components/ui/field.tsx" "use client"; import type { ReactNode } from "react"; import { FieldError, Label as AriaLabel, Text } from "react-aria-components"; import { cx } from "@/utils/cx"; /** Shared field chrome: 40px tall, radius 12, 1px border-strong, accent border + 3px ring on focus. */ export const fieldBase = "w-full rounded-md border border-line-strong bg-surface text-base text-fg outline-none transition-[border,box-shadow] " + "placeholder:text-fg-muted data-hovered:border-fg-disabled " + "data-focused:border-accent data-focused:shadow-focus data-focus-within:border-accent data-focus-within:shadow-focus " + "data-invalid:border-error data-invalid:data-focused:shadow-focus-error " + "data-disabled:border-line data-disabled:bg-subtle data-disabled:text-fg-disabled data-disabled:placeholder:text-fg-disabled"; export function Label({ className, children }: { className?: string; children: ReactNode }) { return {children}; } export function Description({ children }: { children: ReactNode }) { return ( {children} ); } export function ErrorMessage({ children }: { children?: ReactNode }) { return {children}; } ``` ## Textarea (component: Forms) Multiline field, 14 Regular at 140% line height, minimum 96px tall. Docs: https://vantu-ui.vercel.app/components/textarea Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/textarea.json npm: react-aria-components ```tsx title="src/components/ui/textarea.tsx" "use client"; import { TextArea as AriaTextArea, TextField, type TextFieldProps } from "react-aria-components"; import { cx } from "@/utils/cx"; import { Description, ErrorMessage, Label, fieldBase } from "./field"; export interface TextareaProps extends Omit { label?: string; description?: string; errorMessage?: string; placeholder?: string; rows?: number; className?: string; } /** Multiline field — 14 Regular at 140% line height, min height 96. */ export function Textarea({ label, description, errorMessage, placeholder, rows = 4, className, ...props }: TextareaProps) { return ( {label && } {description && !errorMessage && {description}} {errorMessage} ); } ``` ```tsx title="src/components/ui/field.tsx" "use client"; import type { ReactNode } from "react"; import { FieldError, Label as AriaLabel, Text } from "react-aria-components"; import { cx } from "@/utils/cx"; /** Shared field chrome: 40px tall, radius 12, 1px border-strong, accent border + 3px ring on focus. */ export const fieldBase = "w-full rounded-md border border-line-strong bg-surface text-base text-fg outline-none transition-[border,box-shadow] " + "placeholder:text-fg-muted data-hovered:border-fg-disabled " + "data-focused:border-accent data-focused:shadow-focus data-focus-within:border-accent data-focus-within:shadow-focus " + "data-invalid:border-error data-invalid:data-focused:shadow-focus-error " + "data-disabled:border-line data-disabled:bg-subtle data-disabled:text-fg-disabled data-disabled:placeholder:text-fg-disabled"; export function Label({ className, children }: { className?: string; children: ReactNode }) { return {children}; } export function Description({ children }: { children: ReactNode }) { return ( {children} ); } export function ErrorMessage({ children }: { children?: ReactNode }) { return {children}; } ``` ## Checkbox (component: Forms) 16px checkbox with checked, indeterminate and disabled states. Docs: https://vantu-ui.vercel.app/components/checkbox Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/checkbox.json npm: lucide-react, react-aria-components ```tsx title="src/components/ui/checkbox.tsx" "use client"; import { Check, Minus } from "lucide-react"; import type { ReactNode } from "react"; import { Checkbox as AriaCheckbox, type CheckboxProps as AriaCheckboxProps } from "react-aria-components"; import { cx } from "@/utils/cx"; export interface CheckboxProps extends Omit { children?: ReactNode; className?: string; } /** 16px checkbox, radius 4. Checked and indeterminate fill with accent. */ export function Checkbox({ children, className, ...props }: CheckboxProps) { return ( {({ isSelected, isIndeterminate }) => ( <> {isIndeterminate ? : isSelected ? : null} {children} )} ); } ``` ## Radio (component: Forms) 16px radio buttons in a labelled group. Docs: https://vantu-ui.vercel.app/components/radio Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/radio.json npm: react-aria-components ```tsx title="src/components/ui/radio.tsx" "use client"; import type { ReactNode } from "react"; import { Radio as AriaRadio, RadioGroup as AriaRadioGroup, type RadioGroupProps as AriaRadioGroupProps, type RadioProps as AriaRadioProps, } from "react-aria-components"; import { cx } from "@/utils/cx"; import { Label } from "./field"; export interface RadioGroupProps extends Omit { label?: string; children: ReactNode; className?: string; } export function RadioGroup({ label, children, className, ...props }: RadioGroupProps) { return ( {label && }
{children}
); } /** 16px radio. Selected state shows a 6px white dot on accent. */ export function Radio({ children, className, ...props }: AriaRadioProps & { children?: ReactNode; className?: string }) { return ( {children} ); } ``` ```tsx title="src/components/ui/field.tsx" "use client"; import type { ReactNode } from "react"; import { FieldError, Label as AriaLabel, Text } from "react-aria-components"; import { cx } from "@/utils/cx"; /** Shared field chrome: 40px tall, radius 12, 1px border-strong, accent border + 3px ring on focus. */ export const fieldBase = "w-full rounded-md border border-line-strong bg-surface text-base text-fg outline-none transition-[border,box-shadow] " + "placeholder:text-fg-muted data-hovered:border-fg-disabled " + "data-focused:border-accent data-focused:shadow-focus data-focus-within:border-accent data-focus-within:shadow-focus " + "data-invalid:border-error data-invalid:data-focused:shadow-focus-error " + "data-disabled:border-line data-disabled:bg-subtle data-disabled:text-fg-disabled data-disabled:placeholder:text-fg-disabled"; export function Label({ className, children }: { className?: string; children: ReactNode }) { return {children}; } export function Description({ children }: { children: ReactNode }) { return ( {children} ); } export function ErrorMessage({ children }: { children?: ReactNode }) { return {children}; } ``` ## Switch (component: Forms) 40 × 24 track with a 16px knob and 4px inset. Docs: https://vantu-ui.vercel.app/components/switch Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/switch.json npm: react-aria-components ```tsx title="src/components/ui/switch.tsx" "use client"; import type { ReactNode } from "react"; import { Switch as AriaSwitch, type SwitchProps as AriaSwitchProps } from "react-aria-components"; import { cx } from "@/utils/cx"; export interface SwitchProps extends Omit { children?: ReactNode; className?: string; } /** Track 40 × 24 with a 16px knob and 4px inset. */ export function Switch({ children, className, ...props }: SwitchProps) { return ( {children} ); } ``` ## Chip & Kbd (component: Forms) 32px selectable and removable tokens for criteria builders and tag editors, plus keyboard keys. Docs: https://vantu-ui.vercel.app/components/chip Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/chip.json npm: lucide-react, react-aria-components ```tsx title="src/components/ui/chip.tsx" "use client"; import { Check, X } from "lucide-react"; import type { ReactNode } from "react"; import { Button as AriaButton, ToggleButton, type ToggleButtonProps } from "react-aria-components"; import { cx } from "@/utils/cx"; const chipBase = "inline-flex h-8 cursor-default items-center gap-1.5 rounded-sm px-3 text-base font-medium outline-none transition-colors " + "data-focus-visible:shadow-focus [&_svg]:size-3.5"; /** Selectable token used in criteria builders and persona pickers. */ export function Chip({ children, className, ...props }: Omit & { children: ReactNode; className?: string }) { return ( {({ isSelected }) => ( <> {isSelected && } {children} )} ); } /** Removable token used in tag editors. */ export function RemovableChip({ children, onRemove, className }: { children: ReactNode; onRemove?: () => void; className?: string }) { return ( {children} ); } ``` ```tsx title="src/components/ui/kbd.tsx" import { cx } from "@/utils/cx"; /** Marks keyboard shortcuts. */ export function Kbd({ className, children }: { className?: string; children: React.ReactNode }) { return ( {children} ); } ``` ## Badge (component: Data display) Six tones × two styles. Soft is a tinted status or category. Dot is a neutral surface with a tone dot for workflow status. Docs: https://vantu-ui.vercel.app/components/badge Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/badge.json Props: - `tone`: "neutral" | "accent" | "info" | "success" | "warning" | "error" = "neutral" — Color. - `variant`: "soft" | "dot" | "solid" | "outline" = "soft" — Style. - `size`: "sm" | "md" = "md" — 20 or 24px. - `icon`: ReactNode — Optional 12px icon. ```tsx title="src/components/ui/badge.tsx" import type { ReactNode } from "react"; import { cx } from "@/utils/cx"; export type BadgeTone = "neutral" | "accent" | "info" | "success" | "warning" | "error"; export type BadgeVariant = "soft" | "dot" | "solid" | "outline"; export interface BadgeProps { tone?: BadgeTone; /** * `soft` tinted status/category (default) · `dot` neutral surface with a tone dot · * `solid` filled for high emphasis · `outline` white with a tone border. */ variant?: BadgeVariant; /** `md` is 24px, `sm` is 20px. */ size?: "sm" | "md"; icon?: ReactNode; className?: string; children: ReactNode; } const soft: Record = { neutral: "bg-neutral-soft text-neutral-text", accent: "bg-accent-soft text-accent-text", info: "bg-info-soft text-info-text", success: "bg-success-soft text-success-text", warning: "bg-warning-soft text-warning-text", error: "bg-error-soft text-error-text", }; const solid: Record = { neutral: "bg-inverse text-fg-inverse", accent: "bg-accent text-fg-inverse", info: "bg-info text-fg-inverse", success: "bg-success text-fg-inverse", warning: "bg-warning text-fg-inverse", error: "bg-error text-fg-inverse", }; const outline: Record = { neutral: "bg-surface text-neutral-text ring-1 ring-inset ring-line-strong", accent: "bg-surface text-accent-text ring-1 ring-inset ring-accent-soft-border", info: "bg-surface text-info-text ring-1 ring-inset ring-info-border", success: "bg-surface text-success-text ring-1 ring-inset ring-success-border", warning: "bg-surface text-warning-text ring-1 ring-inset ring-warning-border", error: "bg-surface text-error-text ring-1 ring-inset ring-error-border", }; const dot: Record = { neutral: "bg-fg-muted", accent: "bg-accent", info: "bg-info", success: "bg-success", warning: "bg-warning", error: "bg-error", }; export function Badge({ tone = "neutral", variant = "soft", size = "md", icon, className, children }: BadgeProps) { return ( {variant === "dot" && } {icon} {children} ); } ``` ## Counter (component: Data display) Navigation and tab counts. 20px pill, 12 Medium. Docs: https://vantu-ui.vercel.app/components/counter Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/counter.json ```tsx title="src/components/ui/counter.tsx" import { cx } from "@/utils/cx"; export interface CounterProps { /** `muted` for counts, `accent` for selection, `alert` for unread. */ tone?: "muted" | "accent" | "alert"; className?: string; children: number | string; } /** Navigation and tab counts. 20px pill, 12 Medium. */ export function Counter({ tone = "muted", className, children }: CounterProps) { return ( {children} ); } ``` ## Avatar (component: Data display) People are circular initials on a soft tint (24 in tables, 32 in lists, 40 in headers). Companies are square marks. Docs: https://vantu-ui.vercel.app/components/avatar Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/avatar.json Props: - `name`: string — Used for initials, the title and a stable color. - `src`: string — Photo URL. Falls back to initials. - `size`: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" = "md" — 20, 24, 32, 40, 48 or 56px. - `status`: "online" | "away" | "busy" | "offline" — Presence indicator. - `verified`: boolean — Verified check. - `color`: "blue" | "green" | "amber" | "rose" | "violet" | "slate" | "teal" — Overrides the color picked from the name. ```tsx title="src/components/ui/avatar.tsx" import { cx } from "@/utils/cx"; export type AvatarColor = "blue" | "green" | "amber" | "rose" | "violet" | "slate" | "teal"; export type AvatarSize = "xs" | "sm" | "md" | "lg" | "xl" | "2xl"; export type AvatarStatus = "online" | "away" | "busy" | "offline"; const colors: Record = { blue: "bg-avatar-blue-bg text-avatar-blue-fg", green: "bg-avatar-green-bg text-avatar-green-fg", amber: "bg-avatar-amber-bg text-avatar-amber-fg", rose: "bg-avatar-rose-bg text-avatar-rose-fg", violet: "bg-avatar-violet-bg text-avatar-violet-fg", slate: "bg-avatar-slate-bg text-avatar-slate-fg", teal: "bg-avatar-teal-bg text-avatar-teal-fg", }; // size/avatar-sm|md|lg — 24 in tables, 32 in lists, 40 in headers. const sizes: Record = { xs: "size-5 text-[8px]", sm: "size-6 text-[9px]", md: "size-8 text-xs", lg: "size-10 text-base", xl: "size-12 text-lg", "2xl": "size-14 text-xl", }; // Indicator diameter scales with the avatar. const indicator: Record = { xs: "size-1.5 ring-1", sm: "size-2 ring-[1.5px]", md: "size-2.5 ring-2", lg: "size-3 ring-2", xl: "size-3.5 ring-2", "2xl": "size-4 ring-[2.5px]", }; const statusColor: Record = { online: "bg-success", away: "bg-warning", busy: "bg-error", offline: "bg-fg-disabled", }; const palette = Object.keys(colors) as AvatarColor[]; function initialsOf(name: string) { return name .split(/\s+/) .filter(Boolean) .slice(0, 2) .map((p) => p[0]!.toUpperCase()) .join(""); } /** Stable color per name, so the same person always gets the same tint. */ function colorFor(name: string): AvatarColor { let h = 0; for (const ch of name) h = (h * 31 + ch.charCodeAt(0)) >>> 0; return palette[h % palette.length]!; } export interface AvatarProps { name: string; src?: string; size?: AvatarSize; color?: AvatarColor; /** Presence dot, bottom-right. */ status?: AvatarStatus; /** Verified check, top-right. */ verified?: boolean; className?: string; } /** People are circular initials on a soft tint, or a photo. Optional presence and verified marks. */ export function Avatar({ name, src, size = "md", color, status, verified, className }: AvatarProps) { const face = ( {src ? ( // eslint-disable-next-line @next/next/no-img-element {name} ) : ( {initialsOf(name)} )} ); if (!status && !verified) return face; return ( {face} {status && ( )} {verified && ( )} ); } export function AvatarGroup({ names, size = "sm", max = 4 }: { names: string[]; size?: AvatarSize; max?: number }) { const shown = names.slice(0, max); const rest = names.length - shown.length; return (
{shown.map((n) => ( ))} {rest > 0 && ( +{rest} )}
); } export interface CompanyMarkProps { name: string; size?: AvatarSize; /** Brand color for the square mark. Defaults to inverse. */ color?: string; className?: string; } /** Companies are square marks with a brand color. */ export function CompanyMark({ name, size = "md", color, className }: CompanyMarkProps) { return ( {name[0]?.toUpperCase()} ); } ``` ## Score Meter (component: Data display) AI score as 10 ticks plus the value. ≥ 80 hot (green), 60–79 warm (amber), < 60 cold (gray). Docs: https://vantu-ui.vercel.app/components/score-meter Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/score-meter.json Props: - `score`: number — 0–100. - `showValue`: boolean = true — Show the number. ```tsx title="src/components/ui/score-meter.tsx" import { cx } from "@/utils/cx"; export interface ScoreMeterProps { /** 0–100. Level = round(score / 10). */ score: number; showValue?: boolean; className?: string; } /** Temperature tier: ≥ 80 hot (green), 60–79 warm (amber), < 60 cold (gray). */ export function scoreTier(score: number): "hot" | "warm" | "cold" { if (score >= 80) return "hot"; if (score >= 60) return "warm"; return "cold"; } const tierColor = { hot: "bg-success", warm: "bg-warning", cold: "bg-fg-muted" }; /** AI score as 10 ticks (4 × 16, 4px gap) + value. */ export function ScoreMeter({ score, showValue = true, className }: ScoreMeterProps) { const clamped = Math.max(0, Math.min(100, score)); const level = Math.round(clamped / 10); const tier = scoreTier(clamped); return (
{Array.from({ length: 10 }, (_, i) => ( ))}
{showValue && {clamped}}
); } ``` ## Delta & Metric (component: Data display) Delta is a trend glyph and value in the semantic tone. Metric is label, 32 SemiBold value, delta and caption. Docs: https://vantu-ui.vercel.app/components/metric Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/metric.json npm: lucide-react Props: - `value`: number — Delta: sign picks tone and glyph. - `invert`: boolean — Delta: lower is better. - `aside`: ReactNode — Metric: visual on the right, e.g. Sparkbars. ```tsx title="src/components/ui/metric.tsx" import { ArrowDownRight, ArrowUpRight, Minus } from "lucide-react"; import type { ReactNode } from "react"; import { cx } from "@/utils/cx"; export interface DeltaProps { /** Positive, negative or zero. The sign picks the tone and glyph. */ value: number; /** Formatted label. Defaults to `+12%`. */ children?: ReactNode; /** Flip colors when lower is better (e.g. bounce rate). */ invert?: boolean; className?: string; } /** Trend glyph + 12 Medium value in the semantic tone. */ export function Delta({ value, children, invert, className }: DeltaProps) { const up = value > 0; const flat = value === 0; const good = invert ? !up : up; const Icon = flat ? Minus : up ? ArrowUpRight : ArrowDownRight; return ( {children ?? `${up ? "+" : ""}${value}%`} ); } export interface MetricProps { label: ReactNode; value: ReactNode; delta?: ReactNode; caption?: ReactNode; /** Visual on the right, e.g. a . */ aside?: ReactNode; size?: "md" | "lg"; className?: string; } /** Label, 32 SemiBold value, delta, caption. */ export function Metric({ label, value, delta, caption, aside, size = "lg", className }: MetricProps) { return (
{label}
{value} {delta}
{caption &&
{caption}
}
{aside}
); } /** Tiny bar sparkline used beside metrics. The last bar is highlighted. */ export function Sparkbars({ values, className }: { values: number[]; className?: string }) { const max = Math.max(...values, 1); return (
{values.map((v, i) => ( ))}
); } ``` ## Progress Bar (component: Data display) 4px track for usage, quotas and rates. Docs: https://vantu-ui.vercel.app/components/progress-bar Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/progress-bar.json ```tsx title="src/components/ui/progress-bar.tsx" import { cx } from "@/utils/cx"; export interface ProgressBarProps { value: number; max?: number; label?: string; /** Shows `value / max` on the right of the label. */ showValue?: boolean; tone?: "accent" | "neutral" | "success" | "warning" | "error"; caption?: string; /** `top` puts label and value above the bar; `right` puts the percentage beside it. */ labelPosition?: "top" | "right"; className?: string; } const tones = { accent: "bg-accent", neutral: "bg-chart-neutral", success: "bg-success", warning: "bg-warning", error: "bg-error" }; /** 4px track used for usage, quotas and sequence rates. */ export function ProgressBar({ value, max = 100, label, showValue, tone = "accent", caption, labelPosition = "top", className }: ProgressBarProps) { const pct = Math.max(0, Math.min(100, (value / max) * 100)); if (labelPosition === "right") { return (
{Math.round(pct)}%
); } return (
{(label || showValue) && (
{label && {label}} {showValue && ( {value.toLocaleString("en-US")} / {max.toLocaleString("en-US")} )}
)}
{caption && {caption}}
); } ``` ## Card (component: Data display) Layered card: a subtle shell (radius 16, 4px padding) holding a header and an inner white panel. Docs: https://vantu-ui.vercel.app/components/card Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/card.json ```tsx title="src/components/ui/card.tsx" import type { ReactNode } from "react"; import { cx } from "@/utils/cx"; /** * Vantu cards are layered: a subtle outer shell (radius 16, 4px padding) * holding a header and an inner white panel. */ export function Card({ className, children }: { className?: string; children: ReactNode }) { return (
{children}
); } export interface CardHeaderProps { title: ReactNode; description?: ReactNode; /** An or similar mark. */ icon?: ReactNode; actions?: ReactNode; className?: string; } export function CardHeader({ title, description, icon, actions, className }: CardHeaderProps) { return (
{icon}

{title}

{description &&

{description}

}
{actions &&
{actions}
}
); } /** The inner white panel. */ export function CardBody({ className, children }: { className?: string; children: ReactNode }) { return
{children}
; } export function CardFooter({ className, children }: { className?: string; children: ReactNode }) { return
{children}
; } const tileTones = { accent: "bg-linear-to-b from-accent-light to-accent text-fg-inverse", teal: "bg-linear-to-b from-[#2fd1b4] to-[#14a88f] text-fg-inverse", rose: "bg-linear-to-b from-[#ff7a9a] to-[#f04f75] text-fg-inverse", orange: "bg-linear-to-b from-[#ff9a5a] to-[#f2702e] text-fg-inverse", neutral: "bg-surface text-fg-secondary shadow-button", dashed: "border border-dashed border-line-strong bg-surface text-fg-muted", }; /** 32px rounded icon tile that marks card headers. */ export function IconTile({ tone = "accent", className, children }: { tone?: keyof typeof tileTones; className?: string; children: ReactNode }) { return ( {children} ); } ``` ## Timeline (component: Data display) Items connect with a 1px rail; the last item drops the rail. Docs: https://vantu-ui.vercel.app/components/timeline Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/timeline.json ```tsx title="src/components/ui/timeline.tsx" import type { ReactNode } from "react"; import { cx } from "@/utils/cx"; export interface TimelineItem { id: string; icon: ReactNode; title: ReactNode; meta?: ReactNode; } /** Items connect with a 1px rail; the last item drops the rail. */ export function Timeline({ items, className }: { items: TimelineItem[]; className?: string }) { return (
    {items.map((item, i) => (
  1. {i < items.length - 1 && } {item.icon}
    {item.title}
    {item.meta &&
    {item.meta}
    }
  2. ))}
); } ``` ## Description List (component: Data display) Key/value rows inside a plain card (white, 1px border, radius 16, padding 20) for details and settings. Docs: https://vantu-ui.vercel.app/components/description-list Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/description-list.json ```tsx title="src/components/ui/description-list.tsx" import type { ReactNode } from "react"; import { cx } from "@/utils/cx"; export interface DescriptionListProps { items: { label: string; value: ReactNode }[]; className?: string; } /** Key/value rows for detail panels: muted label column, primary value. */ export function DescriptionList({ items, className }: DescriptionListProps) { return (
{items.map((it) => (
{it.label}
{it.value}
))}
); } /** Plain card (white, 1px border, radius 16, padding 20) for details and settings. */ export function PlainCard({ title, actions, className, children }: { title?: ReactNode; actions?: ReactNode; className?: string; children: ReactNode }) { return (
{(title || actions) && (

{title}

{actions}
)} {children}
); } ``` ## Brand & Integration Marks (component: Data display) Product lockup, wordmark and mark in two sizes, 24px integration tiles and social sign-in buttons. Docs: https://vantu-ui.vercel.app/components/integration-mark Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/integration-mark.json npm: lucide-react ```tsx title="src/components/ui/integration-mark.tsx" import { Cloud, FileSpreadsheet, Hash, Mail, Zap } from "lucide-react"; import type { ReactNode } from "react"; import { cx } from "@/utils/cx"; /** * Simplified integration marks: a 24px tile in the provider's color with a * generic glyph. Swap in official logos if your license allows. */ export type IntegrationId = "salesforce" | "hubspot" | "gmail" | "outlook" | "apollo" | "linkedin" | "zapier" | "slack" | "google" | "microsoft" | "csv"; const marks: Record = { salesforce: { name: "Salesforce", className: "bg-[#00a1e0] text-white", glyph: }, hubspot: { name: "HubSpot", className: "bg-[#ff7a59] text-white", glyph: h }, gmail: { name: "Gmail", className: "bg-[#ea4335] text-white", glyph: }, outlook: { name: "Outlook", className: "bg-[#0a64d6] text-white", glyph: }, apollo: { name: "Apollo", className: "bg-[#f8d021] text-[#1b1b1b]", glyph: A }, linkedin: { name: "LinkedIn", className: "bg-[#0a66c2] text-white", glyph: in }, zapier: { name: "Zapier", className: "bg-[#ff4f00] text-white", glyph: }, slack: { name: "Slack", className: "bg-[#4a154b] text-white", glyph: }, google: { name: "Google", className: "bg-surface shadow-button", glyph: }, microsoft: { name: "Microsoft", className: "bg-surface shadow-button", glyph: }, csv: { name: "CSV", className: "bg-muted text-fg-secondary", glyph: }, }; export const integrationIds = Object.keys(marks) as IntegrationId[]; export function integrationName(id: IntegrationId) { return marks[id].name; } export function IntegrationMark({ id, size = "md", className }: { id: IntegrationId; size?: "md" | "lg"; className?: string }) { const m = marks[id]; return ( {m.glyph} ); } export function GoogleGlyph() { return ( ); } export function MicrosoftGlyph() { return ( ); } /** Product lockup: mark + wordmark in Large (32) and Small (24). */ export function BrandLockup({ name = "Vantu", size = "lg", variant = "lockup" }: { name?: string; size?: "lg" | "sm"; variant?: "lockup" | "wordmark" | "mark" }) { const mark = ( {name[0]} ); if (variant === "mark") return {mark}; return ( {variant === "lockup" && mark} {name} ® ); } ``` ## Nav Item (component: Navigation) Sidebar link with optional muted count or unread badge, plus uppercase section labels. Docs: https://vantu-ui.vercel.app/components/nav-item Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/nav-item.json ```tsx title="src/components/ui/nav-item.tsx" "use client"; import { createContext, type ReactNode, useContext } from "react"; import { cx } from "@/utils/cx"; import { Counter } from "./counter"; /** True inside a collapsed (icon-only) sidebar. NavItem and SectionLabel adapt to it. */ export const NavCollapsedContext = createContext(false); export interface NavItemProps { icon?: ReactNode; label: string; href?: string; active?: boolean; /** Trailing muted count. */ count?: number | string; /** Unread count rendered as a red counter. */ badge?: number; className?: string; } /** * The nav item look, shared by and any router link that must match it * (e.g. the docs sidebar): 40px, radius 10, 16px icon · hover tint · active = * white raised surface. */ export function navItemClass({ active, collapsed, size = "md", className }: { active?: boolean; collapsed?: boolean; size?: "sm" | "md"; className?: string } = {}) { return cx( "relative flex items-center text-base text-fg outline-none transition-colors", // md: 40px product sidebar · sm: 32px compact lists (docs sidebar) size === "sm" ? "h-8 gap-2.5 rounded-sm" : "h-10 gap-3 rounded-md", "hover:bg-active focus-visible:shadow-focus [&_svg]:size-4 [&_svg]:shrink-0 [&_svg]:text-fg-secondary", collapsed ? "justify-center px-0" : size === "sm" ? "px-2.5" : "px-3", active && "bg-surface font-medium shadow-button hover:bg-surface [&_svg]:text-fg", className, ); } /** Sidebar link. Default · Hover · Active (white raised surface). Icon-only inside a collapsed sidebar. */ export function NavItem({ icon, label, href = "#", active, count, badge, className }: NavItemProps) { const collapsed = useContext(NavCollapsedContext); return ( {icon} {collapsed ? ( badge !== undefined && ) : ( <> {label} {badge !== undefined ? ( {badge} ) : count !== undefined ? ( {typeof count === "number" ? count.toLocaleString("en-US") : count} ) : null} )} ); } /** The section label look (uppercase 12 Medium +0.6 tracking), shared with the docs sidebar headings. */ export const sectionLabelClass = "px-3 pb-1.5 pt-3 text-label text-fg-muted"; /** Uppercase 12 Medium +0.6 tracking section label. A short divider inside a collapsed sidebar. */ export function SectionLabel({ className, children }: { className?: string; children: ReactNode }) { const collapsed = useContext(NavCollapsedContext); if (collapsed) return
; return
{children}
; } ``` ```tsx title="src/components/ui/counter.tsx" import { cx } from "@/utils/cx"; export interface CounterProps { /** `muted` for counts, `accent` for selection, `alert` for unread. */ tone?: "muted" | "accent" | "alert"; className?: string; children: number | string; } /** Navigation and tab counts. 20px pill, 12 Medium. */ export function Counter({ tone = "muted", className, children }: CounterProps) { return ( {children} ); } ``` ## Tabs (component: Navigation) Underline tabs with a 2px text-primary indicator. Docs: https://vantu-ui.vercel.app/components/tabs Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/tabs.json npm: react-aria-components ```tsx title="src/components/ui/tabs.tsx" "use client"; import type { ReactNode } from "react"; import { Tab as AriaTab, TabList as AriaTabList, TabPanel as AriaTabPanel, Tabs as AriaTabs, type TabListProps, type TabPanelProps, type TabProps, type TabsProps, } from "react-aria-components"; import { cx } from "@/utils/cx"; export function Tabs({ className, ...props }: Omit & { className?: string }) { return ; } export function TabList({ className, ...props }: Omit, "className"> & { className?: string }) { return ; } /** Underline tab — 2px text-primary indicator on the selected tab. */ export function Tab({ className, children, ...props }: Omit & { className?: string; children: ReactNode }) { return ( {children} ); } export function TabPanel({ className, ...props }: Omit & { className?: string }) { return ; } ``` ## Segmented Control (component: Navigation) Compact single choice for ranges such as 7D · 30D · 90D. Docs: https://vantu-ui.vercel.app/components/segmented-control Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/segmented-control.json npm: react-aria-components ```tsx title="src/components/ui/segmented-control.tsx" "use client"; import type { Key } from "react-aria-components"; import { ToggleButton, ToggleButtonGroup } from "react-aria-components"; import { cx } from "@/utils/cx"; export interface SegmentedControlProps { options: { id: string; label: string }[]; value?: string; defaultValue?: string; onChange?: (id: string) => void; "aria-label": string; size?: "sm" | "md"; className?: string; } /** Segmented control for ranges (7D · 14D · 30D). */ export function SegmentedControl({ options, value, defaultValue, onChange, size = "md", className, ...props }: SegmentedControlProps) { return ( ) => { const [first] = keys; if (first !== undefined) onChange?.(String(first)); }} className={cx("inline-flex items-center gap-0.5 rounded-[10px] bg-muted p-0.5", className)} > {options.map((o) => ( {o.label} ))} ); } ``` ## Pagination (component: Navigation) Table footer. Summary left, pages right; 32px page items, radius 8. Docs: https://vantu-ui.vercel.app/components/pagination Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/pagination.json npm: lucide-react, react-aria-components ```tsx title="src/components/ui/pagination.tsx" "use client"; import { ChevronLeft, ChevronRight } from "lucide-react"; import { Button as AriaButton } from "react-aria-components"; import { cx } from "@/utils/cx"; export interface PaginationProps { page: number; pageCount: number; onPageChange: (page: number) => void; /** Summary shown on the left, e.g. "1–25 of 128 prospects". */ summary?: string; className?: string; } function pages(current: number, count: number): (number | "…")[] { if (count <= 7) return Array.from({ length: count }, (_, i) => i + 1); const set = new Set([1, 2, current - 1, current, current + 1, count]); const sorted = [...set].filter((p) => p >= 1 && p <= count).sort((a, b) => a - b); const out: (number | "…")[] = []; sorted.forEach((p, i) => { if (i > 0 && p - sorted[i - 1]! > 1) out.push("…"); out.push(p); }); return out; } const item = "inline-flex size-8 cursor-default items-center justify-center rounded-sm text-sm font-medium tabular text-fg-secondary outline-none transition-colors " + "data-hovered:bg-muted data-hovered:text-fg data-focus-visible:shadow-focus data-disabled:text-fg-disabled [&_svg]:size-4"; /** Table footer. Summary left, pages right; 32px page items, radius 8. */ export function Pagination({ page, pageCount, onPageChange, summary, className }: PaginationProps) { return ( ); } ``` ## Modal & Drawer (component: Overlays) Shared header and footer parts. Modal is 560px wide; drawer is 480px wide, full height, docked right. Docs: https://vantu-ui.vercel.app/components/modal Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/modal.json npm: lucide-react, react-aria-components Props: - `title`: string — Dialog heading. - `description`: string — Line under the title. - `variant`: "modal" | "drawer" = "modal" — Layout. - `footer`: (close) => ReactNode — Footer actions. - `footerNote`: ReactNode — Left side of the footer. ```tsx title="src/components/ui/modal.tsx" "use client"; import { X } from "lucide-react"; import type { ReactNode } from "react"; import { Button as AriaButton, Dialog, DialogTrigger, Heading, Modal as AriaModal, ModalOverlay, type ModalOverlayProps, } from "react-aria-components"; import { cx } from "@/utils/cx"; export { DialogTrigger }; export interface ModalProps extends Omit { title: string; description?: string; /** Footer content, typically secondary + primary buttons. Receives `close`. */ footer?: (close: () => void) => ReactNode; /** Left side of the footer, e.g. "128 prospects selected". */ footerNote?: ReactNode; /** `modal` is 560px centered; `drawer` is 480px full-height docked right. */ variant?: "modal" | "drawer"; children?: ReactNode; } /** Shared header/footer parts for dialogs and drawers. */ export function Modal({ title, description, footer, footerNote, variant = "modal", children, ...props }: ModalProps) { const drawer = variant === "drawer"; return ( {({ close }) => ( <>
{title} {description &&

{description}

}
{children}
{footer && (
{footerNote}
{footer(close)}
)} )}
); } ``` ## Tooltip (component: Overlays) Dark 12 Medium bubble, radius 8, raised shadow. One line, no arrow. Docs: https://vantu-ui.vercel.app/components/tooltip Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/tooltip.json npm: react-aria-components ```tsx title="src/components/ui/tooltip.tsx" "use client"; import type { ReactNode } from "react"; import { Tooltip as AriaTooltip, TooltipTrigger, type TooltipProps as AriaTooltipProps } from "react-aria-components"; import { cx } from "@/utils/cx"; export { TooltipTrigger }; /** Dark 12 Medium bubble, radius 8, raised shadow. One line, no arrow. */ export function Tooltip({ className, children, ...props }: Omit & { className?: string; children: ReactNode }) { return ( {children} ); } ``` ## AI Search (component: AI & workflow) The one prominent control on AI screens: 64px bar, natural-language query in 16 Regular and a Large primary action. Docs: https://vantu-ui.vercel.app/components/ai-search Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/ai-search.json npm: lucide-react, react-aria-components Props: - `onSubmit`: (query: string) => void — Called on Enter or button press. - `placeholder`: string — Prompt hint. - `actionLabel`: string = "Find prospects" — Button label. - `isPending`: boolean — Shows the spinner on the action. ```tsx title="src/components/ui/ai-search.tsx" "use client"; import { ArrowRight, Sparkles } from "lucide-react"; import { useState } from "react"; import { Input, TextField } from "react-aria-components"; import { cx } from "@/utils/cx"; import { Button } from "./button"; export interface AISearchProps { value?: string; defaultValue?: string; onChange?: (value: string) => void; /** Called with the query on Enter or button press. */ onSubmit?: (query: string) => void; placeholder?: string; actionLabel?: string; isPending?: boolean; className?: string; } /** * The one prominent control on AI screens. 64px tall, natural-language * query in 16 Regular, Large (44) primary action. States: empty · filled · focus. */ export function AISearch({ value, defaultValue = "", onChange, onSubmit, placeholder = "Describe who you’re looking for — role, company type, size, location, signals…", actionLabel = "Find prospects", isPending, className, }: AISearchProps) { const [inner, setInner] = useState(defaultValue); const query = value ?? inner; const submit = () => query.trim() && onSubmit?.(query.trim()); return (
{ e.preventDefault(); submit(); }} className={cx( "group flex h-16 items-center gap-3 rounded-lg border border-line bg-surface pl-5 pr-2.5 shadow-card transition-[border,box-shadow]", "focus-within:border-accent focus-within:shadow-[var(--shadow-card),var(--shadow-focus)]", className, )} > { setInner(v); onChange?.(v); }} className="min-w-0 flex-1" > ); } ``` ```tsx title="src/components/ui/button.tsx" "use client"; import { Loader2 } from "lucide-react"; import type { ReactNode } from "react"; import { Button as AriaButton, type ButtonProps as AriaButtonProps } from "react-aria-components"; import { cx } from "@/utils/cx"; export type ButtonVariant = "primary" | "secondary" | "ghost" | "danger" | "neutral" | "soft" | "outline" | "danger-soft"; export type ButtonSize = "2xs" | "xs" | "sm" | "md" | "lg"; export interface ButtonProps extends Omit { variant?: ButtonVariant; size?: ButtonSize; /** Icon rendered before the label. */ leadingIcon?: ReactNode; /** Icon rendered after the label. */ trailingIcon?: ReactNode; /** Square button with only an icon. Requires `aria-label`. */ iconOnly?: boolean; className?: string; children?: ReactNode; } const base = "group relative inline-flex shrink-0 cursor-default select-none items-center justify-center gap-2 whitespace-nowrap rounded-md text-base font-medium outline-none transition-[background,box-shadow,color] duration-150 " + "data-focus-visible:ring-3 data-focus-visible:ring-accent/25 " + "data-disabled:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0"; const variants: Record = { primary: "bg-linear-to-b from-accent-light to-accent text-fg-inverse shadow-button-primary " + "data-hovered:from-accent data-hovered:to-accent-hover data-pressed:from-accent-pressed data-pressed:to-accent-pressed " + "data-disabled:bg-none data-disabled:bg-muted data-disabled:text-fg-disabled data-disabled:shadow-none", secondary: "bg-surface text-fg shadow-button data-hovered:bg-subtle data-pressed:bg-active " + "data-disabled:bg-muted data-disabled:text-fg-disabled data-disabled:shadow-none [&_svg]:text-fg-secondary", ghost: "text-fg data-hovered:bg-muted data-pressed:bg-active data-disabled:text-fg-disabled [&_svg]:text-fg-secondary", danger: "bg-error text-fg-inverse data-hovered:bg-error-hover data-pressed:bg-error-text " + "data-disabled:bg-muted data-disabled:text-fg-disabled", // Dark filled — for high-emphasis actions on light surfaces when accent would compete. neutral: "bg-inverse text-fg-inverse shadow-[0_1px_2px_rgb(0_0_0/0.12),inset_0_1px_0_rgb(255_255_255/0.08)] data-hovered:bg-fg/90 data-pressed:bg-fg/80 " + "data-disabled:bg-muted data-disabled:text-fg-disabled data-disabled:shadow-none", // Accent "lighter" — tinted, no shadow. soft: "bg-accent-soft text-accent-text data-hovered:bg-accent-soft-border data-pressed:bg-accent-soft-border " + "data-disabled:bg-muted data-disabled:text-fg-disabled", // Accent stroke on white. outline: "bg-surface text-accent-text shadow-[inset_0_0_0_1px_var(--color-accent-soft-border)] data-hovered:bg-accent-soft data-pressed:bg-accent-soft-border " + "data-disabled:bg-muted data-disabled:text-fg-disabled data-disabled:shadow-none", "danger-soft": "bg-error-soft text-error-text data-hovered:bg-error-border data-pressed:bg-error-border " + "data-disabled:bg-muted data-disabled:text-fg-disabled", }; // Heights: 28 / 32 / 36 / 40 / 44 (size/button-sm|md|lg plus compact sizes). Padding tightens on the icon side. const sizes: Record = { "2xs": { base: "h-7 gap-1 rounded-sm px-2 text-sm [&_svg]:size-3.5", lead: "pl-1.5", trail: "pr-1.5", icon: "size-7 px-0" }, xs: { base: "h-8 gap-1.5 rounded-[10px] px-2.5", lead: "pl-2", trail: "pr-2", icon: "size-8 px-0" }, sm: { base: "h-9 px-3", lead: "pl-2", trail: "pr-2.5", icon: "size-9 px-0" }, md: { base: "h-10 px-4", lead: "pl-3", trail: "pr-3", icon: "size-10 px-0" }, lg: { base: "h-11 px-5", lead: "pl-4", trail: "pr-4", icon: "size-11 px-0" }, }; export function Button({ variant = "secondary", size = "md", leadingIcon, trailingIcon, iconOnly, isPending, className, children, ...props }: ButtonProps) { const s = sizes[size]; return ( {isPending ? : leadingIcon} {iconOnly ? (isPending ? null : children) : children} {!iconOnly && trailingIcon} ); } ``` ## Criterion Chip (component: AI & workflow) Structured criterion produced by AI search: muted key + value, removable. 32px, radius 12. Docs: https://vantu-ui.vercel.app/components/criterion-chip Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/criterion-chip.json npm: lucide-react, react-aria-components Props: - `label`: string — Muted key, e.g. “Role”. - `value`: string — Criterion value. - `onRemove`: () => void — Shows the remove button when set. ```tsx title="src/components/ui/criterion-chip.tsx" "use client"; import { X } from "lucide-react"; import { Button as AriaButton } from "react-aria-components"; import { cx } from "@/utils/cx"; export interface CriterionChipProps { /** Muted key, e.g. "Role". */ label: string; value: string; onRemove?: () => void; className?: string; } /** Structured criterion produced by AI search: muted key + value, removable. 32px, radius 12. */ export function CriterionChip({ label, value, onRemove, className }: CriterionChipProps) { return ( {label} {value} {onRemove && ( )} ); } ``` ## Sequence Step (component: AI & workflow) One card per step: channel tile, title, timing meta, content preview and optional stats. Channels: email · LinkedIn · call · task. Docs: https://vantu-ui.vercel.app/components/sequence-step Install: npx shadcn@latest add https://vantu-ui.vercel.app/r/sequence-step.json npm: lucide-react, react-aria-components Props: - `step`: number — Step number. - `channel`: "email" | "linkedin" | "call" | "task" — Picks the icon and label. - `name`: string — Step name, shown as “Email · Intro”. - `timing`: string — e.g. “Day 1 · Automatic”. - `subject / preview`: string — Content preview. - `stats`: { label, value }[] — Footer stats. ```tsx title="src/components/ui/sequence-step.tsx" "use client"; import { CheckSquare, Clock, Mail, MoreHorizontal, Phone } from "lucide-react"; import type { ReactNode } from "react"; import { cx } from "@/utils/cx"; import { IconButton } from "./icon-button"; import { Menu, MenuItem, MenuSeparator, MenuTrigger } from "./menu"; export type SequenceChannel = "email" | "linkedin" | "call" | "task"; function LinkedinGlyph(props: { "aria-hidden"?: boolean }) { return ( in ); } const channels: Record }> = { email: { label: "Email", Icon: Mail }, linkedin: { label: "LinkedIn", Icon: LinkedinGlyph }, call: { label: "Call", Icon: Phone }, task: { label: "Task", Icon: CheckSquare }, }; export interface SequenceStepProps { step: number; channel: SequenceChannel; /** e.g. "Intro" — rendered as "Email · Intro". */ name: string; /** Timing meta, e.g. "Day 1 · Automatic". */ timing: string; subject?: string; preview?: string; stats?: { label: string; value: ReactNode }[]; className?: string; } /** Highlights {{variables}} in templates. */ function Template({ text }: { text: string }) { return ( <> {text.split(/(\{\{[^}]+\}\})/g).map((part, i) => part.startsWith("{{") ? ( {part} ) : ( part ), )} ); } /** One card per step: channel tile, title, timing meta, content preview and optional stats. */ export function SequenceStep({ step, channel, name, timing, subject, preview, stats, className }: SequenceStepProps) { const ch = channels[channel]; return (

{ch.label} · {name}

{timing}

Step {step} Edit step Duplicate Delete
{(subject || preview) && (
{subject && (