# Youj components > Youj: Accessible components, animated icons, illustrations and themes that move together. It is a React UI kit with accessible components on shadcn and Base UI (`@youj/react`), motion tokens, primitives, animated icons that morph between states and brand marks (`@youj/motion`, `@youj/icons`), opt-in interface sounds the components cue as they move (`@youj/sound`), themes with contrast checked against WCAG AA, isometric illustrations drawn from the theme (`@youj/illustrations`), and the same source to copy in with `npx @youj/cli add`. It needs React 19 and Tailwind CSS v4. Agents: install with `npx @youj/cli add ` (or the packages), never `npx shadcn add`. Install with `npx @youj/cli add ` or import from the package. Full pages: https://www.youj.dev/docs/components/.md, or https://www.youj.dev/llms-full.txt for everything. ## Accordion `import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from '@youj/react'` Base UI accordion. Props of `AccordionTrigger`: `headingLevel?: 2 | 3 | 4 | 5 | 6` ## Account Menu `import { AccountMenu, AccountMenuUser, AccountMenuWorkspace } from '@youj/react'` The signed-in user's menu: an avatar that opens a DropdownMenu with a profile header, the workspaces to switch between, your own rows (profile, settings, keyboard shortcuts), a Theme submenu and Sign out. Props of `AccountMenu`: `user: AccountMenuUser`, `workspaces?: AccountMenuWorkspace[]`, `workspace?: string`, `theme?: string`, `colorMode?: 'system' | 'light' | 'dark'`, `align?: 'end' | 'start' | 'center'` ## Action Island `import { ActionIsland, ActionIslandGroup, ActionIslandMark, ActionIslandSeparator, ActionIslandTile } from '@youj/react'` A floating tray of actions over a canvas. Props of `ActionIsland`: `size?: 'default' | 'lg'` ## Action List `import { ActionList, ActionListItem } from '@youj/react'` Things to act on, one per row: an icon tile in the row’s `tone`, a title and one line of `detail`, an optional `meta` chip (the date, amount or state that makes it urgent, in `metaTone`) and the row’s own `action`. Props of `ActionList`: `title?: ReactNode`, `description?: ReactNode`, `count?: number`, `action?: ReactNode`, `headingLevel?: 2 | 3 | 4 | 5 | 6` ## Activity Rings `import { ActivityRing, ActivityRings } from '@youj/react'` Goals side by side as concentric rings: a day’s move, exercise and stand, a team’s quotas, a quarter’s key results. Props of `ActivityRings`: `rings: readonly ActivityRing[]`, `size?: Extract`, `legend?: 'side' | 'below' | false`, `format?: Intl.NumberFormatOptions`, `inView?: InView`, `sound?: boolean` ## Alert `import { Alert, AlertAction, AlertDescription, AlertTitle } from '@youj/react'` A status message in four severities. Props of `Alert`: `variant?: AlertVariant | null`, `icon?: ReactNode | false`, `dismissible?: boolean`, `open?: boolean`, `defaultOpen?: boolean`, `dismissLabel?: string` ## Alert Dialog `import { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, ConfirmDialog } from '@youj/react'` Base UI alert dialog: it asks before something happens. Props of `AlertDialogAction`: `variant?: 'default' | 'danger' | 'ghost' | 'outline' | 'link' | 'secondary'`, `sound?: boolean`, `size?: 'default' | 'sm' | 'lg' | 'xs' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg'` ## Allocation Meter `import { AllocationMeter, Envelope } from '@youj/react'` Budget envelopes as a rack of cells, one column each, draining from the top as money goes. Props of `AllocationMeter`: `envelopes: Envelope[]`, `step?: number`, `segments?: number`, `format?: Intl.NumberFormatOptions`, `locale?: string`, `label?: string` ## Anchor Nav `import { AnchorNav, AnchorNavItem } from '@youj/react'` A table of contents that follows the reader. Props of `AnchorNav`: `items: AnchorNavItem[]`, `title?: ReactNode`, `scrollContainer?: RefObject`, `offset?: number` ## Annotated Image `import { AnnotatedImage, ImageAnnotation } from '@youj/react'` A picture with numbered callouts joined by leader lines to labels in the gutters beside it. Props of `AnnotatedImage`: `annotations: ImageAnnotation[]`, `src?: string`, `alt?: string`, `media?: ReactNode`, `caption?: ReactNode`, `value?: string | null` ## App Header `import { AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderMenu, AppHeaderMenuLink, AppHeaderNav, AppHeaderSearch } from '@youj/react'` The app's top bar (a navbar): brand, primary navigation (plain links or a MegaMenu), a search trigger for the command palette, actions and the account menu. Props of `AppHeader`: `sticky?: boolean`, `condense?: boolean`, `scrollContainer?: RefObject` ## App Page `import { AppPage } from '@youj/react'` A page inside an app’s frame: the title, a line under it and the actions at the end, over the page’s sections on one gutter, so every page of the app starts at the same place. Props of `AppPage`: `title?: ReactNode`, `description?: ReactNode`, `actions?: ReactNode`, `headingLevel?: 1 | 2 | 3`, `width?: 'page' | 'fill' | 'readable'`, `classNames?: Partial>` ## Aspect Ratio `import { AspectRatio } from '@youj/react'` A box that keeps its shape as its width changes: the CSS aspect-ratio property, with the ratio as a number (16 / 9). Props of `AspectRatio`: `ratio: number` ## Async Button `import { AsyncButton } from '@youj/react'` A Button that runs async work on press and shows its whole lifecycle in place. Props of `AsyncButton`: `variant?: 'default' | 'danger' | 'ghost' | 'outline' | 'link' | 'secondary'`, `size?: 'default' | 'sm' | 'lg' | 'xs' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg'`, `sound?: boolean`, `pendingLabel?: string`, `successLabel?: string | ((result: TResult) => string)`, `errorLabel?: string | ((error: unknown) => string)` ## Audio Recorder `import { AudioRecorder, AudioRecordingInfo } from '@youj/react'` Record a voice note or an audio clip, listen back, then keep it or not. Props of `AudioRecorder`: `maxDuration?: number`, `mimeType?: string`, `disabled?: boolean`, `size?: Extract`, `value?: Blob | string | null`, `saved?: boolean` ## Avatar `import { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from '@youj/react'` Base UI avatar: the fallback shows until the image has actually loaded, and stays if it fails, so there is never a broken-image frame. Props of `Avatar`: `size?: 'sm' | 'default' | 'lg'` ## Avatar Stack `import { AvatarStack, AvatarStackUser } from '@youj/react'` Who is here: overlapping avatars (the Avatar primitives), the first `max` shown and the rest behind a "+N" that opens the full list in a Popover, with each person's role and status. Props of `AvatarStack`: `users: readonly AvatarStackUser[]`, `max?: number`, `size?: 'sm' | 'default' | 'lg'`, `label?: string` ## Avatar Upload `import { AvatarUpload } from '@youj/react'` A profile photo you can replace. Props of `AvatarUpload`: `src?: string | null`, `fallback?: ReactNode`, `name?: string`, `onSave: (file: File) => unknown`, `accept?: string`, `maxSize?: number` ## Badge `import { Badge, BadgeDot, BadgeRemove } from '@youj/react'` A 20px pill in 12px medium type. Props of `Badge`: `variant?: 'default' | 'neutral' | 'success' | 'warning' | 'danger' | 'solid' | 'outline' | 'secondary'`, `size?: 'default' | 'sm' | 'lg'`, `color?: string` ## Banner `import { Banner, BannerAction, BannerTitle } from '@youj/react'` An announcement bar across the top of a page or app: a launch, a maintenance window, a trial running out. Props of `Banner`: `icon?: ReactNode`, `dismissible?: boolean`, `open?: boolean`, `defaultOpen?: boolean`, `dismissLabel?: string`, `variant?: 'default' | 'accent' | 'warning' | 'inverse'` ## Bottom Tab Bar `import { BottomTabBar, BottomTabBarItem } from '@youj/react'` A phone app's primary navigation, pinned to the bottom edge and padded by the safe-area inset. Props of `BottomTabBarItem`: `icon: ReactNode`, `label: ReactNode`, `active?: boolean`, `badge?: number | boolean`, `badgeLabel?: string` ## Breadcrumb `import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from '@youj/react'` shadcn's breadcrumb in youj's type: a named `nav` around an ordered list, 13px muted crumbs, the current page in full ink (plain text with aria-current="page", not a link to itself), slanted hairline separators hidden from assistive tech. Props of `BreadcrumbList`: `maxItems?: number`, `itemsBeforeCollapse?: number`, `itemsAfterCollapse?: number` ## Breakdown List `import { BreakdownItem, BreakdownList } from '@youj/react'` How a total splits, as rows of a color marker, a name (with an optional line of `detail`), a value and its share of the total. Props of `BreakdownList`: `items: readonly BreakdownItem[]`, `total?: number`, `format?: Intl.NumberFormatOptions`, `locale?: string`, `variant?: 'rows' | 'tiles'`, `marker?: 'swatch' | 'bar'` ## Button `import { Button } from '@youj/react'` Base UI button in six variants and eight sizes on the control-height scale (24/28/32/40px, +8px on touch). Props of `Button`: `variant?: 'default' | 'danger' | 'ghost' | 'outline' | 'link' | 'secondary'`, `loading?: boolean`, `loadingLabel?: string`, `sound?: boolean`, `size?: 'default' | 'sm' | 'lg' | 'xs' | 'icon' | 'icon-xs' | 'icon-sm' | 'icon-lg'` ## Button Group `import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText } from '@youj/react'` shadcn’s button group: buttons, inputs and menus joined into one strip (role="group"). Props of `ButtonGroup`: `orientation?: 'horizontal' | 'vertical'` ## Calendar `import { Calendar, CalendarDayButton } from '@youj/react/date'` A month grid on react-day-picker whose days and arrows are the library’s Button, so hover, press and focus match every other control. ## Calendar Heatmap `import { CalendarHeatmap, StreakCheck, StreakDay, StreakStats, StreakSummary } from '@youj/react'` A habit’s days as heat dots: a column per week, a row per weekday, the newest week at the inline end (mirrored in RTL). Props of `CalendarHeatmap`: `days: StreakDay[]`, `today?: string`, `weeks?: number`, `max?: number`, `tone?: 'accent' | 'success' | 'warning' | 'chart-1' | 'chart-2' | 'chart-3' | 'chart-4' | 'chart-5'`, `size?: 'default' | 'sm'` ## Capsule `import { Capsule, CapsuleLabel } from '@youj/react'` The shell every capsule shares: one row of controls or figures on a floating surface, the control height plus an inset that keeps the discs inside concentric with its ends. Props of `Capsule`: `size?: 'sm' | 'default'` ## Capsule Player `import { CapsulePlayer } from '@youj/react'` Now playing, in one capsule: cover art in a disc, the title and artist, a thin rail you can seek (a Base UI slider: arrows step five seconds, Home/End jump; spoken as “1:12 of 3:40”), the time played in mono, and previous, play and next. Props of `CapsulePlayer`: `title: string`, `subtitle?: string`, `artwork?: ReactNode`, `playing: boolean`, `onPlayingChange: (playing: boolean) => void`, `position: number` ## Capsule Search `import { CapsuleSearch } from '@youj/react'` A search that waits as a small capsule with its shortcut on it and opens when it’s wanted. Props of `CapsuleSearch`: `value?: string`, `defaultValue?: string`, `shortcut?: string`, `width?: { rest: string; open: string }`, `size?: 'sm' | 'default'` ## Capsule Stepper `import { CapsuleStepper } from '@youj/react'` − value + in a capsule, for a number you nudge more than type. Props of `CapsuleStepper`: `value?: number | null`, `defaultValue?: number | null`, `min?: number`, `max?: number`, `step?: number`, `largeStep?: number` ## Capsule Toggle `import { CapsuleToggle, CapsuleToggleOption } from '@youj/react'` Two or three options in a capsule: a SegmentedControl whose track is the capsule itself, so the lit key glides inside the floating pill (motion’s SlidingIndicator on the smooth spring, retargeting mid-glide; it jumps under reduced motion). Props of `CapsuleToggle`: `options: readonly CapsuleToggleOption[]`, `label?: string`, `iconOnly?: boolean`, `size?: 'sm' | 'default'`, `variant?: 'underline' | 'pill'`, `defaultValue?: string` ## Card `import { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@youj/react'` shadcn's card on youj surfaces: a hairline-bordered panel with a header (title, description, and an action slot beside them), content and a recessed footer. Props of `Card`: `size?: 'default' | 'sm'`, `variant?: 'default' | 'inset' | 'panel'`, `lift?: boolean`, `spotlight?: boolean` ## Carousel `import { Carousel, CarouselAutoplayToggle, CarouselCaption, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumb, CarouselThumbs } from '@youj/react/carousel'` shadcn's carousel on Embla: swipe, drag and flick, looping, and responsive slides per view (a basis on each item). Props of `Carousel`: `opts?: CarouselOptions`, `plugins?: CarouselPlugin`, `orientation?: 'horizontal' | 'vertical'`, `setApi?: (api: CarouselApi) => void`, `autoplay?: boolean | number` ## Cell Bar `import { CellBar, CellBarCell } from '@youj/react'` A total built from its periods: a cell per month, each as wide as its amount, solid when settled and hatched when projected. Props of `CellBar`: `cells: readonly CellBarCell[]`, `max?: number`, `target?: number`, `targetLabel?: string`, `tone?: 'accent' | 'neutral' | 'success' | 'warning' | 'danger' | 'chart-1' | 'chart-2' | 'chart-3' | 'chart-4' | 'chart-5'`, `captions?: boolean` ## Chart `import { ChartContainer, ChartDataTable, ChartLegend, ChartLegendContent, ChartMotion, ChartTooltip, ChartTooltipContent } from '@youj/react/chart'` shadcn's chart on Recharts, colored by the theme and timed by youj. Props of `ChartContainer`: `config: ChartConfig`, `children: string | number | bigint | boolean | ReactElement> | Iterable | ReactPortal | Promise`, `title?: string`, `summary?: ReactNode`, `initialDimension?: { width: number; height: number }` ## Chat `import { ChatCitation, ChatSource, ChatSources } from '@youj/react'` Composable parts for AI chat and assistant interfaces: a message list that stays with a streaming answer, messages with actions, streamed markdown, a composer, thinking and reasoning, tool calls, citations, suggestions and an empty state. Props of `ChatCitation`: `index: number`, `source: ChatSource`, `defaultOpen?: boolean` ## Checkbox `import { Checkbox, CheckboxMark } from '@youj/react'` Base UI checkbox. Props of `Checkbox`: `sound?: boolean` ## Choice Card `import { ChoiceCard, ChoiceCardGroup } from '@youj/react'` A selectable card: icon, title, description and its control, with the whole card as the target. Props of `ChoiceCard`: `value?: string`, `control?: 'radio' | 'checkbox' | 'switch'`, `checked?: boolean`, `defaultChecked?: boolean`, `title: ReactNode`, `description?: ReactNode` ## Code Block `import { CodeBlock, CodeTokens } from '@youj/react'` A block of code on a recessed panel: a header with the file name or language and a copy button, then the code, highlighted as tokens (never HTML) and scrolling sideways instead of wrapping. Props of `CodeBlock`: `code: string`, `language?: string`, `filename?: string`, `lineNumbers?: boolean`, `copyLabel?: string`, `actions?: ReactNode` ## Collapsible `import { Collapsible, CollapsibleChevron, CollapsibleContent, CollapsibleTrigger } from '@youj/react'` Base UI collapsible: a trigger with aria-expanded / aria-controls and a panel that wears motion's yj-collapse preset (height to the measured size, then auto, with the content fading; a reversal mid-way continues from where it is). Props of `CollapsibleChevron`: `size?: number` ## Color Opacity Field `import { ColorOpacityField, ColorOpacityValue } from '@youj/react'` A color and its opacity as one grouped control: a swatch that opens the Color Picker, a hex field that reads 3, 4, 6 or 8 digits (pasted or typed), and an opacity percentage you can drag. Props of `ColorOpacityField`: `value?: ColorOpacityValue`, `defaultValue?: ColorOpacityValue`, `size?: 'sm' | 'default'`, `disabled?: boolean`, `id?: string` ## Color Picker `import { ColorPicker, Swatch } from '@youj/react'` A color picked in a Popover: a saturation/brightness area, a hue Slider on a spectrum, hex and OKLCH fields, swatches (the theme presets’ accents by default) and the browser’s eyedropper where it exists. Props of `ColorPicker`: `value?: string`, `defaultValue?: string`, `format?: 'hex' | 'oklch'`, `swatches?: Swatch[]`, `disabled?: boolean`, `id?: string` ## Combobox `import { Combobox, ComboboxOption } from '@youj/react/command'` A single-select picker with search, composed from Popover and Command: the popup grows out of the trigger on yj-pop, the active row glides, the list eases its height, and the chosen row draws its check. Props of `Combobox`: `options: ComboboxOption[]`, `value?: string | null`, `defaultValue?: string | null`, `placeholder?: string`, `searchPlaceholder?: string`, `emptyMessage?: ReactNode` ## Command `import { Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandLoading, CommandSeparator, CommandShortcut, ListOption, OptionNote } from '@youj/react/command'` cmdk, re-skinned: a flush search row over a list. Props of `CommandDialog`: `title?: string`, `description?: string`, `showCloseButton?: boolean`, `presentation?: 'auto' | 'sheet' | 'popover'`, `autoFocusField?: boolean`, `children: ReactNode` ## Command Palette `import { CommandPalette, CommandPalettePage, CommandPaletteState } from '@youj/react/command'` A ⌘K palette on CommandDialog: groups, nested pages with a breadcrumb back stack (Backspace on an empty search or Escape steps back; the last Escape closes), recent items, results loaded as you type, and a footer that spells out the keys. Props of `CommandPalette`: `open?: boolean`, `defaultOpen?: boolean`, `shortcut?: string | false`, `placeholder?: string`, `title?: string`, `description?: string` ## Context Menu `import { ContextMenu, ContextMenuContent, ContextMenuTrigger } from '@youj/react'` Base UI context menu: right click, long press, or the Menu key / Shift+F10 on a focused row. Props of `ContextMenuContent`: `container?: HTMLElement | ShadowRoot | RefObject`, `presentation?: 'auto' | 'sheet' | 'popover'` ## Contribution List `import { ContributionEnd, ContributionList, ContributionStep } from '@youj/react'` A waterfall told as a list: the `baseline` row, each thing that moved the figure as a signed step (`items`: an icon, a label, a line of `detail`, +n or −n), and the `total` row, highlighted. Props of `ContributionList`: `baseline: ContributionEnd & { value: number }`, `items: readonly ContributionStep[]`, `total: ContributionEnd`, `format?: Intl.NumberFormatOptions`, `locale?: string`, `invert?: boolean` ## Countdown `import { Countdown, CountdownTime } from '@youj/react'` Days, hours, minutes and seconds to a moment, in tabular figures under their unit names. Props of `Countdown`: `to: Date | number | string`, `formatLabel?: (time: CountdownTime) => string`, `locale?: string`, `labels?: Partial>`, `paused?: boolean` ## Coverage Matrix `import { CoverageMatrix, CoverageMatrixColumn, CoverageMatrixRow } from '@youj/react'` How well each row is covered by each column: every cell fills from the bottom by depth in its column’s color, and a cell with nothing is hatched. Props of `CoverageMatrix`: `rows: readonly CoverageMatrixRow[]`, `columns: readonly CoverageMatrixColumn[]`, `max?: number`, `value?: string | null`, `defaultValue?: string | null`, `formatValue?: (value: number) => string` ## Currency Swap `import { CurrencySwap, CurrencySwapAsset, CurrencySwapSubmit } from '@youj/react'` A converter card: what you pay (an amount field and its currency) over what you receive (the converted amount, rolling digit by digit), each with its value below, a round button that flips the two sides, the rate and the primary action. Props of `CurrencySwap`: `assets: CurrencySwapAsset[]`, `from?: string`, `defaultFrom?: string`, `to?: string`, `defaultTo?: string`, `amount?: number | null` ## Data Table `import { DataTableColumnHeader } from '@youj/react/data-table'` The parts a data table on TanStack Table v9 is built from: a column header that sorts, pins, moves, hides and resizes its column, a toolbar with a search, filters with counts and their chips, the columns menu, pagination, a checkbox column and the bar a selection raises. Props of `DataTableColumnHeader`: `header: Header`, `align?: 'start' | 'center' | 'end'`, `menu?: boolean`, `menuOpen?: boolean`, `showSortIndex?: boolean`, `resizable?: boolean` ## Date Picker `import { DatePicker } from '@youj/react/date'` A date you can type or pick: an InputGroup field in the locale’s short format (a complete date selects as you type; it also reads “Sep 27, 2026”, ISO and today/tomorrow) and a calendar button that opens the Calendar in a Popover (yj-pop, then the month slide). Props of `DatePicker`: `value?: Date | null`, `defaultValue?: Date | null`, `locale?: Locale`, `minDate?: Date`, `maxDate?: Date`, `disabledDates?: Matcher | Matcher[]` ## Date Range Picker `import { DateRangePicker, DateRangePreset } from '@youj/react/date'` A span of days: two typed fields (start – end) under one label, and a Popover with presets beside a two-month range Calendar (one month and a row of presets on phones). Props of `DateRangePicker`: `value?: DateRange | null`, `defaultValue?: DateRange | null`, `presets?: false | DateRangePreset[]`, `locale?: Locale`, `minDate?: Date`, `maxDate?: Date` ## Day Rail `import { DayRail, ItineraryDay, ItineraryLeg, ItineraryStay, ItineraryStop } from '@youj/react'` A trip on one rail, a column per day. Props of `DayRail`: `stops: ItineraryStop[]`, `legs: ItineraryLeg[]`, `stays?: ItineraryStay[]`, `start: Date | number`, `days?: number`, `now?: Date | number | null` ## Day Ring `import { DayRing, ScheduleJob, ScheduleOverlap } from '@youj/react'` A day of scheduled runs on a 24-hour dial (`role="img"`, described in words): midnight at the top, clockwise, a quarter-hour ruler with the elapsed part of the day shaded, and one thin track per job with its runs as arcs as long as they take (ticks when they have no duration). Props of `DayRing`: `jobs: readonly ScheduleJob[]`, `now?: Date | number`, `timeZone?: string`, `highlight?: string`, `locale?: string`, `label?: string` ## Density Lanes `import { DensityLane, DensityLanes, DensityLanesTick } from '@youj/react'` When things happen, one lane per kind: each column swells above and below the lane’s spine by its value, on one scale for every lane, over a faint grid of dots. Props of `DensityLanes`: `lanes: readonly DensityLane[]`, `columns: readonly string[]`, `depth?: number`, `maxDot?: number`, `max?: number`, `highlight?: readonly (readonly [number, number])[]` ## Dial `import { Dial, DialBand, DialMark } from '@youj/react'` A bounded value on a ruled arc: a three-quarter ring ticked at every step, the value as an ink knob on the band and large in mono in the middle. Props of `Dial`: `value?: number`, `defaultValue?: number`, `min?: number`, `max?: number`, `step?: number`, `largeStep?: number` ## Dialog `import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from '@youj/react'` Base UI dialog. Props of `Dialog`: `sound?: boolean` ## Diff Bar `import { DiffBar } from '@youj/react'` Two values of one measure, A against B, as a diverging bar: each side grows out from a shared center toward its own end, in cells, with the values in mono at the outer ends. Props of `DiffBar`: `a: number`, `b: number`, `max?: number`, `better?: 'higher' | 'lower'`, `label?: ReactNode`, `names?: [string, string]` ## Diff Viewer `import { DiffViewer } from '@youj/react'` The difference between two versions of a file, as code review reads it. Props of `DiffViewer`: `before?: string`, `after?: string`, `patch?: string`, `language?: string`, `filename?: string`, `view?: 'unified' | 'split'` ## Distribution Strip `import { DistributionStrip } from '@youj/react'` How sampled requests spread across latency: every sample is a dot on a log-scaled strip, stacked into rows where they crowd, with the percentiles (p50, p90 and p99 by default) as flagged hairlines and the objective as a dashed line; past it the strip is hatched and its dots take the warning tone. Props of `DistributionStrip`: `samples: readonly number[]`, `slo?: number`, `percentiles?: readonly number[]`, `domain?: readonly [number, number]`, `rows?: number`, `format?: (ms: number) => string` ## Dot Map `import { DotMap, DotMapRegion } from '@youj/react'` The world as a grid of dots, lit where the numbers are: each region lights the land dots around it like LEDs, the reach and strength growing with its share of the largest value, under a soft halo in its tone (the accent unless it sets one). Props of `DotMap`: `regions?: readonly DotMapRegion[]`, `active?: string | null`, `defaultActive?: string | null`, `formatValue?: (value: number) => string`, `label?: string` ## Drawer `import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger } from '@youj/react'` Base UI drawer: a modal panel on an edge that follows the finger and dismisses when swiped towards that edge (drag the handle with a mouse). Props of `Drawer`: `swipeDirection?: DrawerDirection | 'start' | 'end'` ## Dropdown Menu `import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, MenuPopup } from '@youj/react'` Base UI menu. Props of `DropdownMenuCheckboxItem`: `inset?: boolean` ## Empty `import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from '@youj/react'` An empty state: what isn't here yet, why, and what to do next. Props of `EmptyMedia`: `variant?: 'default' | 'icon'` ## Export Dialog `import { ExportDialog, ExportDialogValue, ExportOption, ExportRequest, ExportResult, ExportSummary } from '@youj/react/date'` Choose what leaves and in which shape, then export it. Props of `ExportDialog`: `open?: boolean`, `defaultOpen?: boolean`, `trigger?: ReactElement`, `title?: ReactNode`, `description?: ReactNode`, `presets?: ('today' | 'yesterday' | 'last7Days' | 'last30Days' | 'thisMonth' | 'lastMonth' | 'yearToDate')[]` ## Field `import { Field, FieldContent, FieldDescription, FieldError, FieldGroup, FieldLabel, FieldLegend, FieldSeparator, FieldSet, FieldTitle } from '@youj/react'` Field is Base UI's Field.Root with shadcn's layout parts. Props of `Field`: `required?: boolean`, `orientation?: 'horizontal' | 'vertical' | 'responsive'` ## File Upload `import { FileRejection, FileUpload, UploadContext, UploadFile, UseFileUploadOptions } from '@youj/react'` Files in, with the whole lifecycle shown. Props of `FileUpload`: `variant?: 'list' | 'gallery'`, `multiple?: boolean`, `disabled?: boolean`, `title?: ReactNode`, `hint?: ReactNode`, `accept?: string` ## Filter Builder `import { FilterBuilder } from '@youj/react'` Builds a query of AND/OR groups of typed rules, such as “Stage is not Lost and (Owner is Ada or Amount > 100000)”. Props of `FilterBuilder`: `fields: FilterField[]`, `value?: FilterGroup`, `defaultValue?: FilterGroup`, `maxDepth?: number`, `summary?: boolean`, `disabled?: boolean` ## Filter Chips `import { FilterChips } from '@youj/react'` A filter query as chips (`label:bug`, `priority:in(p1,p2)`) with a field for the next one, in a filled well. Props of `FilterChips`: `value?: string[]`, `defaultValue?: string[]`, `validate?: (token: string, tokens: string[]) => string | null | undefined | void`, `placeholder?: string`, `disabled?: boolean`, `name?: string` ## Flow Graph `import { FlowEdge, FlowGraph, FlowLayout, FlowLayoutNode, FlowNode } from '@youj/react'` A graph of steps that lays itself out along the flow, showing each step’s state. Props of `FlowGraph`: `nodes: readonly FlowNode[]`, `edges: readonly FlowEdge[]`, `value?: string | null`, `defaultValue?: string | null`, `controls?: string`, `orientation?: FlowOrientation | 'auto'` ## Flow Lanes `import { FlowLane, FlowLanes } from '@youj/react'` Where a stream goes: one source fans out to a lane per destination, each ending beside its name and rate. Props of `FlowLanes`: `source: string`, `lanes: readonly FlowLane[]`, `active?: string | null`, `defaultActive?: string | null`, `paused?: boolean`, `formatValue?: (value: number) => string` ## Forecast Band `import { ForecastBand, ForecastPoint, ForecastScenario } from '@youj/react'` Where a running total will land against a budget. Props of `ForecastBand`: `actual: readonly number[]`, `forecast: readonly ForecastPoint[]`, `budget: number`, `start?: Date | string`, `max?: number`, `format?: Intl.NumberFormatOptions` ## Form `import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormSelect, FormSelectOption, FormSubmit } from '@youj/react/form'` react-hook-form (with any resolver, zod here) wired into Field and AsyncButton, with shadcn’s part names (FormField, FormItem, FormLabel, FormControl, FormDescription, FormMessage). Props of `Form`: `form: UseFormReturn`, `onSubmit: (values: Output) => unknown` ## Gauge `import { Gauge, GaugeThreshold } from '@youj/react'` One bounded score at a glance: a thin half-ring on a scale of ticks, read left to right, the value in its bowl and a word for its band underneath, between the range’s ends (`role="meter"`). Props of `Gauge`: `value: number`, `min?: number`, `max?: number`, `size?: Extract`, `tone?: 'accent' | 'success' | 'warning' | 'danger' | 'neutral'`, `thresholds?: GaugeThreshold[]` ## Gradient Slider `import { GradientSlider, GradientSliderZone } from '@youj/react'` A value on a spectrum. Props of `GradientSlider`: `style?: CSSProperties`, `value?: number`, `defaultValue?: number`, `label?: ReactNode`, `zones?: GradientSliderZone[]`, `tone?: 'spectrum' | 'accent' | 'status'` ## Hatched Bar `import { Hatch, HatchedBar } from '@youj/react'` Solid for what is settled, hatched for what isn’t: a baseline, a pending or projected amount, a run that missed its gate. Props of `HatchedBar`: `value: number`, `max?: number`, `fill?: 'hatched' | 'solid'`, `orientation?: 'vertical' | 'horizontal'`, `tone?: 'accent' | 'neutral' | 'success' | 'warning' | 'danger' | 'chart-1' | 'chart-2' | 'chart-3' | 'chart-4' | 'chart-5'`, `label?: string` ## Hierarchy Chart `import { HierarchyChart, HierarchyChartHandle } from '@youj/react'` A hierarchy drawn as a tidy tree (Reingold–Tilford): an org chart, a team of teams, any parent-and-children structure. Props of `HierarchyChart`: `nodes: T | readonly T[]`, `renderNode?: (node: T, state: HierarchyNodeState) => ReactNode`, `orientation?: 'vertical' | 'horizontal'`, `expanded?: string[]`, `defaultExpanded?: string[]`, `selected?: string | null` ## Histogram Range `import { HistogramRange } from '@youj/react'` A two-thumb range over the distribution it filters. Props of `HistogramRange`: `data?: readonly number[]`, `bins?: readonly number[]`, `binCount?: number`, `min?: number`, `max?: number`, `step?: number` ## History Strip `import { HistoryStrip, UptimeDay } from '@youj/react'` Availability a day at a time: one slim cell per day, oldest at the inline start and today at the end (mirrored in RTL). Props of `HistoryStrip`: `days: readonly UptimeDay[]`, `target?: number`, `critical?: number`, `size?: 'default' | 'sm'`, `interactive?: boolean`, `label?: string` ## Hours Dial `import { HoursDial, HoursDialValue } from '@youj/react'` A stretch of the day on a 24-hour face: midnight at the top, a ruler of quarter-hour ticks all the way round, and two handles on it, a hollow start and a solid end. Props of `HoursDial`: `value?: HoursDialValue`, `defaultValue?: HoursDialValue`, `step?: number`, `largeStep?: number`, `tone?: 'accent' | 'neutral' | 'chart-1' | 'chart-2' | 'chart-3' | 'chart-4' | 'chart-5'`, `locale?: string` ## Hover Card `import { HoverCard, HoverCardContent, HoverCardTrigger } from '@youj/react'` Base UI preview card: a preview of where a link goes, after resting on it (500ms) or focusing it. ## Image Accordion `import { ImageAccordion, ImageAccordionItem } from '@youj/react'` A row or column of pictures where one is open wide and the rest wait as slim strips. Props of `ImageAccordion`: `items: ImageAccordionItem[]`, `value?: string`, `defaultValue?: string`, `activation?: 'hover' | 'click'`, `orientation?: 'horizontal' | 'vertical'`, `sound?: boolean` ## Image Compare `import { ImageCompare, ImageCompareImage } from '@youj/react'` Two pictures stacked with a divider between them: `before` shows on the start side (or the top) up to the divider, `after` past it. Props of `ImageCompare`: `before: ImageCompareSide`, `after: ImageCompareSide`, `value?: number`, `defaultValue?: number`, `orientation?: 'horizontal' | 'vertical'`, `beforeLabel?: ReactNode` ## Import Mapper `import { ImportMapper } from '@youj/react'` Bring a CSV into an app in two screens: drop a file, then see each column with the field it goes to, fix only the rows with problems and say what happens to duplicates, and import with a button that states what will happen. Props of `ImportMapper`: `theme?: ThemeInput`, `embedded?: boolean`, `variant?: 'page' | 'dialog'`, `fill?: boolean`, `headingLevel?: 1 | 2 | 3`, `copy?: Partial` ## Inline Confirm `import { InlineConfirm } from '@youj/react'` A button that confirms in its own place instead of opening a dialog. Props of `InlineConfirm`: `children: ReactNode`, `onConfirm: () => unknown`, `prompt?: string`, `confirmLabel?: string`, `cancelLabel?: string`, `pendingLabel?: string` ## Input `import { Input } from '@youj/react'` Base UI input (a field control, so inside a Field it is labeled, described and validated automatically). 32px on the control scale, 13px text (16px on touch so iOS never zooms). ## Input Group `import { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from '@youj/react'` One bordered frame around a bare text control and its addons (text, icons, keycaps, buttons) on the inline or block edges. Props of `InputGroupAddon`: `align?: 'inline-end' | 'inline-start' | 'block-start' | 'block-end'` ## Input OTP `import { InputOTP, InputOTPResend } from '@youj/react'` A one-time code field for 2FA and email verification. Props of `InputOTP`: `length?: number`, `value?: string`, `defaultValue?: string`, `autoSubmit?: boolean`, `mode?: 'numeric' | 'alphanumeric'`, `groups?: number[]` ## Inspector Panel `import { InspectorPanel, InspectorPanelType, InspectorRow } from '@youj/react'` One property group of a design tool’s side panel. Props of `InspectorPanel`: `title: string`, `enabled?: boolean`, `types?: InspectorPanelType[]`, `type?: string`, `visible?: boolean`, `actions?: ReactNode` ## Item Pager `import { ItemPager } from '@youj/react'` Steps through the records of a list from a detail panel: ↓ opens the next row, ↑ the previous one, and "5 of 48" says where you are. Props of `ItemPager`: `index: number`, `total: number`, `onIndexChange: (index: number) => void`, `shortcuts?: 'focus' | 'global' | 'none'`, `locale?: string` ## Kanban `import { Kanban, KanbanColumn, KanbanLane } from '@youj/react'` A kanban board composed from Card, Badge, Button, Input and ContextMenu. Props of `Kanban`: `columns: KanbanColumn[]`, `cards: C[]`, `lanes?: KanbanLane[]`, `hideEmptyLanes?: boolean`, `renderCard: (card: C, state: { lifted: boolean; selected: boolean }) => ReactNode`, `selectedIds?: ReadonlyArray` ## Kbd `import { Kbd, KbdGroup } from '@youj/react'` A keycap: a recessed tint with a hairline and a 1px bottom edge for depth, in 11px medium type on a 20px square minimum. ## Label `import { Label } from '@youj/react'` A plain `