Skip to content
Intent
Libraries
Loading libraries…
Blog
Blog & Release Notes
About
YouTube
The official TanStack channel.
Workshops
Live sessions from the maintainers.
Release Notes
The latest releases and changelog.
Community
Channels
Discord
Real-time community support.
GitHub
Source, issues, discussions, and releases.
People & Work
Maintainers
Meet the people maintaining the stack.
Showcase
Projects selected by the TanStack team.
Community projects
Tools
Tools
TanChat
Application Starter
Alpha
Generate TanStack app starters.
Stats
NPM and ecosystem usage data.
Merch
Support
Support
Support Overview
Find the right support path.
Partners
Companies supporting TanStack.
OSS Sponsors
Sponsors keeping TanStack open source.
Enterprise Support
Private consulting and expert support.
Contact
Get in touch with the TanStack team.
About
Ethos
How we approach open source.
Tenets
The values that shape TanStack libraries.
Design System
Logos, tokens, and UI components.
Search
Ask AI
Libraries
Blog
Community
Tools
Merch
Support
Search
Ask AI
Sign In
Back
TanStack Intent
/
Registry
/
@loke/ui
Fetching package from npm...
TanStack Intent
/
Registry
/
@loke/ui
@loke/ui
1.3.0 (latest) — 20 skills
1.2.1 — 20 skills
1.2.0 — 20 skills
1.1.0 — 20 skills
1.0.0 — 20 skills
1.0.0-rc.4 — 20 skills
1.0.0-rc.3 — 20 skills
1.0.0-rc.2 — 20 skills
Copy install prompt
To install dependencies:
Skills
(20)
Skills
All Skills
20
accordion
alert-dialog
checkbox
choosing-the-right-component
collapsible
command
context-and-collection
dialog
dropdown-menu
hooks
label
loke-ui
overlay-infrastructure
popover
primitive-and-slot
radio-group
select
switch
tabs
tooltip
Skills
20
History
accordion
Expandable section groups with type=single (exclusive) or type=multiple (independent). AccordionItem/Header/Trigger/Content composition. CSS variable animation via --loke-accordion-content-height. Keyboard navigation (Home/End/Arrow keys). collapsible prop only applies to type=single. AccordionContent proxies --loke-collapsible-content-height into --loke-accordion-content-height.
209 lines
alert-dialog
Confirmation dialogs for destructive actions. AlertDialog, AlertDialogTrigger, AlertDialogPortal, AlertDialogOverlay, AlertDialogContent, AlertDialogTitle, AlertDialogDescription, AlertDialogAction, AlertDialogCancel. Always modal, always prevents outside dismiss, auto-focuses cancel button.
216 lines
checkbox
Checkbox + CheckboxIndicator primitives. Checked/unchecked/indeterminate states via data-state. Hidden native input for form participation. Indeterminate-to-checked toggle cycle. Detached-form prop pattern. Label association required for accessible name.
170 lines
choosing-the-right-component
Decision guide for selecting the correct @loke/ui primitive. Dialog vs AlertDialog, Popover vs Tooltip vs DropdownMenu, Select vs Popover+Command, Accordion vs Collapsible, Checkbox vs Switch. Import path rules: always @loke/ui/[component], never @loke/ui root, never @radix-ui paths. Failure modes: hallucinated components, native HTML fallback, skipping portals, verbose intermediary requirements, conciseness trap.
294 lines
collapsible
Single collapsible section with Collapsible/CollapsibleTrigger/CollapsibleContent. CSS variable animation via --loke-collapsible-content-height and --loke-collapsible-content-width (measured via ResizeObserver-style layout effect). Presence-driven exit animations. Controlled via open/onOpenChange. For multiple coordinated sections, use Accordion (which wraps Collapsible internally).
206 lines
command
Command palettes and searchable lists with Command/CommandInput/CommandList/ CommandItem/CommandGroup (heading prop)/CommandEmpty/CommandLoading. Built-in fuzzy filtering via commandScore. Custom filter function via filter prop. Compose Popover+Command for combobox/async-select patterns — the recommended replacement for Select when options are async, searchable, or dynamically loaded. Vim bindings (ctrl+n/j/p/k) enabled by default.
314 lines
context-and-collection
Building compound components with createContext (error-throwing consumer hook) and createContextScope (nested composition with scope threading). createCollection for DOM-ordered item tracking via data attributes + ResizeObserver pattern. Scope threading required for components that may be nested within themselves (Accordion inside Accordion, nested Menus, etc.).
235 lines
dialog
Modal and non-modal dialogs. Dialog, DialogTrigger, DialogPortal, DialogOverlay, DialogContent, DialogTitle, DialogDescription, DialogClose. Focus trapping, scroll locking, accessible labelling, Presence exit animations. modal=true default.
227 lines
dropdown-menu
Trigger-based dropdown menus. DropdownMenu, DropdownMenuTrigger, DropdownMenuPortal, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent. modal=true default. Selecting an item fires onSelect and auto-closes; preventDefault in onSelect keeps it open. Typeahead requires textValue for icon items. CSS vars: --loke-dropdown-menu-content-available-height, -width, -transform-origin, --loke-dropdown-menu-trigger-height, -width.
260 lines
hooks
Ten shared hooks for building custom components. useControllableState (controlled/uncontrolled dual-mode with dev warnings on mode switch). useCallbackRef (stable callback identity without stale closure risk). useDirection/DirectionProvider (RTL support). useEscapeKeydown (capture-phase escape). useId (React 16-19 compat). useSize (ResizeObserver border-box). usePrevious (previous render value). useLayoutEffect (SSR-safe). useIsHydrated (render gating for portals and browser-only UI). useIsDocumentHidden (Page Visibility API).
263 lines
label
Label primitive wrapping Primitive.label. Prevents text selection on double-click via mousedown prevention when target is not a nested form control. Associate with Checkbox, Switch, RadioGroupItem via htmlFor or wrapping. Do not use plain HTML label.
155 lines
loke-ui
Entry point and router for @loke/ui headless React UI primitives. Subpath imports only — never import from @loke/ui directly. Components across overlays (Dialog, AlertDialog, Popover, Tooltip, DropdownMenu), forms (Checkbox, RadioGroup, Select, Switch, Label), navigation (Accordion, Tabs, Collapsible, Command), and composition (Primitive+Slot, Context+Collection, Overlay Infrastructure, Hooks). All are thin shells over 4 shared infrastructure patterns: DismissableLayer, FocusScope, Presence, useControllableState.
169 lines
overlay-infrastructure
Six shared infrastructure modules under all overlay components. DismissableLayer (stacking, outside dismiss, pointer event blocking, Branch for anchor exemption). FocusScope (trapping, looping, auto-focus on mount/unmount). FocusGuards (sentinel spans for portaled content). Portal (SSR-safe createPortal via useLayoutEffect). Popper (Floating UI positioning, CSS custom properties, collision/flip/arrow). Presence (animation state machine: mounted/unmountSuspended/unmounted). Use this skill when building a custom overlay; prefer component skills (dialog, popover) when using existing primitives.
310 lines
popover
Floating panels anchored to a trigger or custom element. Popover, PopoverTrigger, PopoverAnchor, PopoverPortal, PopoverContent, PopoverClose, PopoverArrow. Non-modal by default (modal=false). Popper positioning via Floating UI. CSS custom properties: --loke-popover-content-available-height, -width, -transform-origin, --loke-popover-trigger-height, -width.
228 lines
primitive-and-slot
Primitive element system (17 HTML types) with asChild composition via Slot. createSlot, createSlottable, Slottable for compound slot patterns. dispatchDiscreteCustomEvent for React 18 batching. Prop merge order: handlers composed (child first then slot), style merged (child wins), className concatenated, all other props child-wins. Mental model: asChild means "render whatever you give me but behave like [element]."
238 lines
radio-group
RadioGroup + RadioGroupItem + RadioGroupIndicator for single-selection groups. Roving focus, arrow-key navigation with auto-selection, Enter prevention per WAI-ARIA. Hidden native radio input for form participation. Standalone Radio primitive available. value prop required on every item.
147 lines
select
Select listbox with SelectTrigger, SelectValue, SelectPortal, SelectContent, SelectViewport, SelectGroup, SelectLabel, SelectItem + SelectItemText (required), SelectItemIndicator, SelectScrollUpButton, SelectScrollDownButton, SelectSeparator, SelectIcon, SelectArrow. Two positioning modes: item-aligned (default) and popper. value="" shows the placeholder. All items must be in tree at open time — use Popover+Command for async/searchable lists.
222 lines
switch
Switch + SwitchThumb for binary on/off toggles. role=switch semantics, no indeterminate state. Hidden native checkbox input for form participation. Label required for accessible name. Use Checkbox for tri-state or multi-select scenarios.
144 lines
tabs
Tabbed interfaces with Tabs/TabsList/TabsTrigger/TabsContent composition. Value-based trigger-to-content linking via matching value props. Roving focus via RovingFocusGroup. activationMode automatic (focus selects) vs manual (Enter/Space selects). Exit animations via Presence; forceMount keeps all panels visible. orientation horizontal (default) or vertical.
198 lines
tooltip
Hover/focus tooltips. TooltipProvider, Tooltip, TooltipTrigger, TooltipPortal, TooltipContent, TooltipArrow. Requires TooltipProvider ancestor. Default delay 700ms, skip-delay 300ms. data-state: closed | delayed-open | instant-open. CSS vars: --loke-tooltip-content-available-height, -width, -transform-origin, --loke-tooltip-trigger-height, -width.
243 lines