<skill_doc> <trigger_keywords>
Trigger Keywords
Activate this skill when the user mentions any of:
Core: Kobalte, Headless UI, Unstyled components, Accessible UI, A11y
Components: Select, Combobox, Dialog, Popover, Toast, Tabs, Accordion, Tooltip, Menubar, DropdownMenu
Concepts: Portal, Trigger, Content, Root, Polymorphism (as prop)
Styling: data-attributes, data-expanded, data-disabled, @kobalte/tailwindcss </trigger_keywords>
β Forbidden Patterns
- NO Built-in Styles: Do NOT expect components to look "good" out of the box. They are unstyled. You MUST apply CSS/Tailwind classes.
- NO Missing Portals: Always use
<Component.Portal>for overlays (Dialog, Popover, Tooltip, Select) to avoid z-index/clipping issues. - NO Manual ARIA: Do NOT manually add
role,aria-expanded, etc. Kobalte manages this. - NO Direct Input in Select: Use
<Select>for button-triggered lists. Use<Combobox>if you need a text input. - NO Skipping
Root: All parts must be nested within theRootcomponent (or passed via Context).
π€ Agent Tool Strategy
- Styling Strategy: Check if Tailwind is used. If so, recommend
@kobalte/tailwindcssplugin forui-selected:modifiers. - Composition: Always show the full structure:
Root->Trigger->Portal->Content. - Accessibility: Emphasize that Kobalte handles focus management and keyboard nav automatically.
- Integration: Kobalte works perfectly with
@opentui/solid(if using standard DOM renderer) or web projects.
Quick Reference (30 seconds)
Kobalte Specialist - Accessible, Headless Primitives for SolidJS.
Philosophy:
- Headless: Logic only. You bring the UI/CSS.
- Accessible: WAI-ARIA APG compliant out of the box.
- Composable: Build complex UIs from granular parts.
Styling via Data Attributes:
[data-expanded]: Component is open.[data-selected]: Item is active.[data-disabled]: Component is inactive.[data-highlighted]: Item is focused via keyboard.
Anatomy:
- Root: State container.
- Trigger: Toggle button.
- Portal: Renders overlay at body root.
- Content: The actual popup/panel.
Resources
- Examples: See
examples/examples.mdfor detailed code patterns. - References: See
references/reference.mdfor official documentation links. </skill_doc>