base-ui
Build, review, migrate, or debug React interfaces that use Base UI (`@base-ui/react`) unstyled accessible primitives. Use when the user asks about Base UI docs, component anatomy, styling, composition, render props, TypeScript wrapper types, forms, dialogs, drawers, popovers, menus, selects, comboboxes, autocomplete, createItems, tabs, toast, OTP Field, accessibility, or replacing lower-level UI primitives with Base UI.
How do I install this agent skill?
npx skills add https://github.com/dobroslavradosavljevic/skills --skill base-uiIs this agent skill safe to install?
- Gen Agent Trust Hubpass
This skill provides comprehensive documentation and implementation guidelines for the Base UI React library. All referenced external resources are official documentation sites or public repositories from a well-known vendor, and no malicious patterns or security risks were identified.
- Socketpass
No alerts
- Snykwarn
Risk: MEDIUM · 1 issue
What does this agent skill do?
Base UI
Use Base UI as an unstyled, accessible React primitive layer. Keep semantics, focus, labels, keyboard behavior, and styling hooks intact while adapting the parts to the host app's design system.
Snapshot: @base-ui/react@1.8.0 (latest, released 2026-09-04; re-verified 2026-10-01). Refresh from source-map.md if the project is pinned elsewhere.
Workflow
- Confirm the installed package and version from the project before changing code. Use
@base-ui/react, not the retired@base-ui-components/reactpackage name. - Read the relevant reference before implementing:
- references/source-map.md: docs sources, package status, inventory, and 1.7–1.8 deltas.
- references/core-patterns.md: setup, styling, composition, state, TypeScript, animation, accessibility, and utilities.
- references/component-patterns.md: anatomy and implementation notes by component family.
- Fetch current official docs when exact prop names, event reasons, release behavior, or component APIs matter. Prefer the installed package's bundled docs (
node_modules/@base-ui/react/docs/index.md, version-matched), then Context7 library/mui/base-uior the page's.mdURL fromhttps://base-ui.com/llms.txt. - Build from documented compound parts first, then wrap with local design-system components only through the
renderprop or thin wrappers that preserve props and refs. - Verify keyboard behavior, focus return, accessible names, controlled/uncontrolled state, portal layering, animation exit behavior, and responsive/mobile behavior.
Implementation Rules
- Import from component subpaths such as
@base-ui/react/dialog,@base-ui/react/combobox, and@base-ui/react/field. - Assemble documented parts. Do not invent components, parts, or shortcuts. Most overlays need
Root, trigger, portal, positioner or viewport, popup, labels/titles/descriptions, and close/actions. - Treat Base UI as unstyled. Style with
className, state-awareclassName/stylefunctions, data attributes, and CSS variables. - Keep accessible names explicit. Use
Field.Label, component-specific labels, native labels, oraria-label/aria-labelledby. - Custom
renderelements must forward refs and spread all received props onto the underlying DOM node. - Prefer uncontrolled components unless the product needs external state. Control with
open/valueplusonOpenChange/onValueChange. - Use event details deliberately:
eventDetails.cancel()blocks the internal state update;eventDetails.allowPropagation()lets a normally stopped DOM event bubble. - For Combobox ID selection, use
Combobox.createItemsandCombobox.Root.Props<Value, Multiple, Item>. Autocomplete has nocreateItems. - Do not copy Tailwind v4-only syntax into Tailwind v3 projects.
- Add portal setup when the app lacks it: isolate the app root and apply the iOS 26+ body style in the core patterns reference.
Verification Checklist
- Markup has the intended roles, labels, disabled/readOnly states, and focus-visible styles.
- Keyboard navigation covers arrows, Home/End, Enter/Space, Escape, tab order, and focus return where relevant.
- Popup/drawer/dialog layers appear above the app and close by trigger, close button, Escape, outside interaction, and route/unmount transitions.
- Form controls submit the intended names/values and surface native, server, or external-library validation errors.
- Animations use
data-starting-style/data-ending-styleorkeepMountedcorrectly; reduced-motion or no-motion remains usable. - TypeScript wrappers expose the correct
Component.Part.Propstypes (including Combobox's thirdItemgeneric) and do not drop refs, handlers, or data attributes.
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/dobroslavradosavljevic/skills/base-ui">View base-ui on skillZs</a>