itechmeat/llm-code/base-ui
Claude Code and agent skill by itechmeat/llm-code
- community
Checking that the SKILL.md file is still in the repository.
Base UI unstyled React components. Covers forms, menus, overlays, composition. Use when building accessible, unstyled React UI components with @base-ui/react, composing with render props, or implementing custom-styled form controls, menus, and overlays. Keywords: @base-ui/react, render props, unstyled components.
Install
npx vskill@latest install itechmeat/llm-code/base-uiSKILL.md
Base UI (React)
Base UI provides unstyled, composable React components. This skill focuses on assembling multi-part components, composing with the render prop, and meeting accessibility requirements while you supply styling.
Quick navigation (references)
Utilities
- references/csp-provider.md
- references/direction-provider.md
- references/merge-props.md
- references/use-render.md
Forms & inputs
- references/form.md
- references/fieldset.md
- references/input.md
- references/number-field.md
- references/otp-field.md
- references/radio.md
- references/select.md
- references/slider.md
- references/switch.md
Feedback & status
- references/meter.md
- references/progress.md
- references/toast.md
Menus, navigation, overlays
- references/drawer.md
- references/menu.md
- references/menubar.md
- references/navigation-menu.md
- references/popover.md
- references/preview-card.md
- references/tabs.md
- references/tooltip.md
Toggles & controls
- references/toggle.md
- references/toggle-group.md
- references/toolbar.md
Layout & separators
- references/scroll-area.md
- references/separator.md
Release Highlights (1.9.0)
- Menu filtering (preview):
<Menu.FilterProvider>wraps a<Menu.Root>or<Menu.SubmenuRoot>,<Menu.Input>takes the query, and<Menu.List>holds the items that get filtered.<Menu.Clear>and<Menu.Empty>cover reset and no-match states. Full details in references/menu.md. - Unmount control: automatic unmounting is decoupled from
actionsRef. CalleventDetails.preventUnmountOnClose()insideonOpenChangeto keep the popup mounted, then end the closing phase yourself withactionsRef.current.unmount(). Applies to Autocomplete, Combobox, Menu, Select, Dialog, Alert Dialog, Popover, Tooltip, and Preview Card. Details in references/popover.md. Menu.RootacceptsonItemHighlighted(highlightedItem, eventDetails). The reason is'keyboard','pointer', or'none'; pointer events may be aMouseEventrather than aPointerEvent, and typing reports'none'.AutocompleteandComboboxsupportautoHighlightwith asynchronous results, accept readonly arrays for multiple values, and report the originating event toonItemHighlighted.Menufixes nested menus without a root trigger, submenu closing when focus returns through its guard, repeated trigger activation toggling submenus, and the focus-guard loop when the trigger is the only tabbable element.Drawerpreserves swipe release velocity on 120 Hz input and after a trailing stationary pointer event,data-base-ui-swipe-ignoregainsxandyoptions, and a drag starting on an SVG scrolls instead of swiping.Accordion.TriggerandCollapsible.Triggerapply the nativedisabledattribute when rendering native buttons, andhiddenUntilFoundpanels expand synchronously onbeforematch.Radio GroupandCheckboxpreferaria-labelover an associated label, ignored arrow keys no longer select on refocus, andinputRefforwarding is fixed.NumberField.ScrubAreafiresonClickonce per click, andOTPFieldno longer over-fills slots during Safari IME composition.Field.Controlno longer warns when an uncontrolleddefaultValuechanges,ScrollAreadrops the presentational viewport role, andTabscan select tabs with function values.- The
CssVariablesandDataAttributestypes are now exported.
v1.7.0 - v1.8.0 highlights
Comboboxadds acreateItemscollection API for building the option collection programmatically.Avatar.Imageadds akeepMountedprop so the image subtree stays mounted (useful for avoiding remount flashes).Toastaccepts functional updates derived from the current toast, and therenderprop is honored inToast.Title,Toast.Description, andToast.Action.AutocompleteandComboboxemitinput-pressandcancel-openchange event details; inlineComboboxexposes anexpandedstate.Combobox.ItemandSelect.Iteminherit the disabled state from their root.Formfocuses the first invalid field in document order;Fieldpublishes neutral validity while async validation is in flight.- Mostly accessibility fixes, popup/overlay behavior fixes, and bundle-size reductions across drawers, menus, tooltips, and scroll areas.
v1.4.1 highlights
mergePropsnow forwards multi-argument event handlers correctly, which matters for wrapped callbacks that receive extra details/state alongside the event.- Tabbability with
display: contentswas fixed; retest custom wrappers and render-prop compositions that flatten DOM structure. - Popup sizing on rapid trigger hover was fixed, and clipped-item highlight clearing inside scroll containers is more reliable.
v1.6.0 highlights
OTPFieldPreviewnamespace is renamed toOTPField; update imports that referenced the preview namespace.- Broad behavioral bug fixes across Accordion, Alert Dialog, Autocomplete, Avatar, Checkbox, Dialog, Drawer, Field, Menu, Number Field, OTP Field, and other components.
v1.5.0 highlights
OTPFieldreplacessanitizeValue()withnormalizeValue()and improves keyboard shortcut plus validation-composition behavior.- Popup-based components now respect controlled
openstate more consistently, which affectsPopover,Menu,PreviewCard, and related overlays. Form,Field, andOTPFieldavoid olderflushSync-style validation timing patterns; retest any local validation scheduling workarounds before keeping them.- RTL behavior is corrected across
NavigationMenu,Popover, andScrollArea. Drawer.Viewportnow forwardsstyle, which is useful for custom viewport sizing and animated layout constraints.
v1.4.0 highlights
OTPFieldarrives as a preview primitive for one-time-password and verification-code entry.- Hidden inputs expose
formandsuppressHydrationWarning, which matters when controls submit to external forms or hydrate across SSR boundaries. renderwarnings andpreventBaseUIHandler()runtime behavior are more reliable in composed components.- Overlay/input primitives received important behavioral fixes across
Drawer,NavigationMenu,Select,Slider,Toast, andSwitch.
v1.3.0 highlights
- Drawer is now stable (no longer preview) and should be treated as a first-class overlay primitive.
- Autocomplete and Combobox add
InputGroup; Combobox, Select, and Slider addLabelparts. - Drawer adds
SwipeAreafor explicit swipe affordances. - Tooltip adds
closeOnClick; Toast can close all toasts. - Checkbox, Radio Group, and Switch improve automatic
aria-labelledbysupport. renderprop support from v1.2.0 remains relevant, including lazy elements.
Core concepts to apply
- Unstyled primitives: all visuals come from your CSS/Tailwind/CSS Modules. Base UI handles behavior and accessibility.
- Multi-part anatomy: most components follow
Root+ subparts (Trigger,Popup,Item, etc.). Assemble them explicitly. - `render` prop: replace the default element or wrap with your own component; when using the function form, merge props manually with
mergeProps. - State-driven styling: many parts expose data attributes such as
data-[popup-open],data-[highlighted],data-[pressed],data-[checked],data-[invalid], etc. - Portals for overlays: use
Portal+Positioner+Popupfor popovers, menus, tooltips, select, navigation menu content, and preview cards.
Recipes
1) Build accessible forms quickly
- Wrap inputs with
Formfor submission and error aggregation. - Use
Field.Rootwith aname, thenField.Label,Field.Control, andField.Errorfor labels and errors. - Group related fields with
Fieldset.Root+Fieldset.Legend. - For
Radiogroups, either useRadioGroupwitharia-labelledby, or renderRadioGroupviaFieldset.Rootand useField.Labelfor each option. - Ensure every form control has an accessible name (label or
Field/Fieldsetlabeling pattern).
2) Compose with render + mergeProps
- When passing a React element to
render, Base UI merges props automatically. - When passing a function to
render, merge Base UI props and your props withmergeProps. - Use
event.preventBaseUIHandler()inside merged event handlers to stop Base UI’s internal behavior when needed (synthetic events only).
3) Overlays and menus (portaled UI)
- Build popups using
Root+Trigger+Portal+Positioner+Popup. - For menus and navigation, add
Item,Separator,Arrow, and list/viewport parts as needed. NavigationMenu.Linksupportsrenderfor framework router links.- To drive the close animation from an external library, call
eventDetails.preventUnmountOnClose()inonOpenChangeand finish withactionsRef.current.unmount();keepMountedon the portal decides whether the DOM node stays.
4) Toasts
- Wrap the app (or a subtree) with
Toast.Provider. - Use
Toast.useToastManager()to create toasts. - Render a
Toast.ViewportinsideToast.Portal, then maptoaststoToast.Rootentries withToast.Content,Toast.Title,Toast.Description, andToast.Close.
5) RTL and CSP constraints
- For RTL behavior, wrap with
DirectionProviderand also setdir="rtl"(provider does not set the DOM direction). - For strict CSP, wrap with
CSPProviderand passnonce, or disable inline style elements if your app supplies external styles. Beware inline style attributes are not controlled byCSPProvider.
6) Sliders and ranges
- Single value sliders: one
Slider.Thumb. - Range sliders: pass an array and render a
Slider.Thumbper value; addindexfor SSR alignment. - Adjust thumb alignment with
thumbAlignmentwhen edge alignment is required.
Critical prohibitions
- Do not omit accessible labels for inputs, sliders, switches, or radio groups.
- Do not expect Base UI to provide default styling; apply your own styles.
- Do not forget
Portalfor overlays that need to escape stacking/overflow contexts. - Do not skip
mergePropswhen using the function form ofrender.
Output expectations
When responding to the user, provide:
- The specific Base UI components to use (and their key parts).
- A brief assembly plan (Root + parts + portal/positioner where relevant).
- A short checklist for accessibility and state-driven styling.
Links
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/base-ui/SKILL.md
Popularity
- Repository stars
- 24
- Repository forks
- 1
- 7-day trend score
- 12
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 20 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/itechmeat/llm-code/base-ui)