/kernel-ui:kernel-uifrom Kernel UI
Build or change React UI with Kernel UI (@kernelui-lib/react), a component library on real semantic HTML. Use whenever a project depends on @kernelui-lib/react and you write or review screens, forms, dialogs, menus, tables or chat/agent UI.
Ships in Kernel UI. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Kernel components wrap real elements: <Button> is a <button>, <Dialog> is a <dialog> opened with showModal(), and <Select> is a <select>. The browser already handles most behaviour, so your job is to choose the right component, pass the right props and style only with tokens.
import "@kernelui-lib/styles"; // tokens + reset
import "@kernelui-lib/react/styles.css"; // component styles
npx @kernelui-lib/cli doctor checks this.kernel MCP server is connected, call search_components or list_components. Otherwise read node_modules/@kernelui-lib/react/llms.txt. Prefer a Kernel component over hand-rolled markup every time one exists.get_component tool, or npx @kernelui-lib/cli docs <name> --markdown, or the types in node_modules/@kernelui-lib/react/dist/index.d.ts. Props from other libraries (asChild, leftIcon, isDisabled, colorScheme) don't exist here.--kernel-* custom property (MCP get_tokens). Never hard-code a hex colour, a pixel radius or 999px.check_code tool, or npx @kernelui-lib/cli check <files>, and fix every error it reports before you finish. If the project uses ESLint, @kernelui-lib/eslint-plugin (kernel.configs.recommended) runs the same checks on every save.@kernelui-lib/testing. Static checks can't see keyboard behaviour. In the project's tests, await assertPage(document.body, { act }) (or assertComponent(container, "Tabs", { act })) checks every Kernel component on screen against its WAI-ARIA pattern: names, state, arrow keys, Escape, focus. Each failure names the rule and the fix. Don't add one-off ARIA to make it pass; fix the props.value / defaultValue / onValueChange for controlled or uncontrolled use. onChange stays the native DOM event. Toggles use checked / defaultChecked / onCheckedChange.details: ChangeDetails<Reason> = { reason, event?, cancel(), isCanceled }. reason is a per-component string union (Tabs: "trigger-press" | "keyboard"; Dialog onOpenChange: "close-button" | "escape-key" | "outside-press" | "programmatic"; DropdownMenu adds "item-press" | "item-keyboard"). The callback runs before the update; details.cancel() keeps the current state and skips side effects such as closing. Use it instead of re-deriving intent from events:
<DropdownMenu render={<Button>Edit</Button>} onOpenChange={(open, d) => {
if (!open && d.reason === "item-keyboard") d.cancel(); // stay open for keyboard users
}}>…</DropdownMenu>
In a controlled component, not updating your state already keeps the value; cancel() makes it explicit. Custom elements: the same reason is on the existing event's detail, and the event is cancelable (event.preventDefault()).filter={(text, query) => score} (0 hides) to replace it; fuzzyScore / fuzzyFilter are exported for your own lists.label is required: it's the accessible name, rendered as a real <label>. To hide it visually, use hideLabel. Never drop it.description, invalid plus errorMessage (shown instead of the description), disabled and required.className goes on the interactive element and accepts a string or (state) => string. Some components also take wrapperClassName. ref always reaches the real DOM element.render, not asChild: <Button render={<a href="/pricing" />}>Pricing</Button>.svg, img or icon component:
iconStart / iconEnd.aria-label.--kernel-icon-size and --kernel-icon-stroke-width tune a whole icon set.role="button" on <Button>.<h1> per page. No Kernel component renders the page heading (Header is a landmark, not a heading), so add it yourself; axe flags a page without one.<ToastViewport> (mount once, then call toast()) and <CommandPalette>.| Job | Use |
|---|---|
| Action / navigation styled as a button | Button (render={<a … />} for links) |
| Text, email, password, search input | TextField |
| Pick one of a few / many options | RadioGroup / Select (native) / Combobox (filterable) |
| On/off setting | Switch; pressed state in a toolbar: Toggle |
| Modal task | Dialog; edge panel with drag-to-dismiss: Sheet |
| Anchored menu or panel | DropdownMenu, Popover, Tooltip, HoverCard, ContextMenu |
| Feedback | Callout (inline, announced), toast() (transient), Progress, Skeleton |
| Tabular data | Table (static) or DataTable (sorting and selection) |
| Chat / agent UI | MessageList + Message + MessageBubble, Composer, MessageScroller, Suggestion, ThinkingIndicator, Reasoning, ToolCall, AgentActivity, TodoList, CodeBlock, FileDiff, Sources |
gap: var(--kernel-space-*).--kernel-radius-container, pad it with --kernel-padding-container-curve. With --kernel-radius-sheet, use --kernel-padding-sheet-curve. A radius picked without its paired padding looks cramped once the theme rounds its corners.outer radius − inner radius of inset at the corner.onClick on a <div> or <span>: use Button.If the app should be usable by an in-page agent (an assistant panel, or a browser agent through WebMCP), use @kernelui-lib/agent: useAgentBridge({ root, registerTools: true }) from @kernelui-lib/agent/react. It reads the real roles and labels, so correctly labelled Kernel components need no extra wiring. Mark risky controls with data-kernel-agent-confirm, pass a confirm that renders ToolApproval outside root, and put private regions in data-kernel-agent-ignore. Guide: https://www.kernelui.com/agent-bridge/
Every component's JSDoc explains which native element it uses and why. Read it with MCP get_component, or in dist/index.d.ts, before you work around a component's behaviour.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/kernel-ui-elementsBuild UI with Kernel UI's framework-free Custom Elements (@kernelui-lib/elements, <kernel-*> tags) in plain HTML, Astro, Vue, Svelte or any framework. Use whenever a project depends on @kernelui-lib/elements./kernel-ui-migrateMove a React app from shadcn/ui or Radix Primitives onto Kernel UI (@kernelui-lib/react). Use when replacing @/components/ui/* or @radix-ui/react-* imports with Kernel components./kernel-ui-themingTheme a Kernel UI app (accent colour, radius, spacing, fonts, dark mode, icon sets) through @kernelui-lib/styles tokens. Use when asked to restyle, rebrand, change roundness or colours, or match a design.npx claudepluginhub kemiljk/kernel-ui --plugin kernel-uiOther plugins' skills for the same job