/kernel-ui:kernel-ui-elementsfrom Kernel UI
Build UI with Kernel UI's framework-free Custom Elements (@kernelui-lib/elements, <kernel-*> tags) in plain HTML, Astro, Vue, Svelte or any framework.
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.
Each <kernel-*> tag builds and owns a real native element in the light DOM: <kernel-button> renders a genuine <button>. There's no shadow root, so the page's own CSS and Kernel's tokens reach everything.
<link rel="stylesheet" href="node_modules/@kernelui-lib/styles/src/index.css" />
<link rel="stylesheet" href="node_modules/@kernelui-lib/elements/dist/kernel.css" />
<script type="module">import "@kernelui-lib/elements";</script>
Bundlers can use import "@kernelui-lib/styles", import "@kernelui-lib/elements/styles.css" and import "@kernelui-lib/elements".
kernel MCP server (search_components, then get_component with platform: "elements"), or read node_modules/@kernelui-lib/elements/llms.txt.error-message, hide-label). Booleans are presence-based (<kernel-checkbox disabled>), and string values go in attributes.tagInput.tags returns an array, and CodeBlock takes lines or code.onValueChange becomes a change event with event.detail. get_component lists each tag's events with the exact detail shape; don't guess it. Value controls follow the platform's beforeinput/input pairing: a cancelable beforevaluechange fires first with the proposed value (event.preventDefault() keeps the current state), then, once committed, valuechange and (where the element has one) change, so a handler can read the element's own state (el.hasAttribute("checked"), el.tags, el.getAttribute("value")). All of them carry event.detail.reason (the same per-component strings as React's ChangeDetails, e.g. "press" | "keyboard"). Dialog/CommandPalette ask with cancel, Popover/DropdownMenu/Accordion items with beforetoggle.npx @kernelui-lib/cli check <files> and fix what it reports.<kernel-select> takes <option>s, <kernel-tabs> takes <kernel-tab> and <kernel-tab-panel>, and triggers are children marked slot="trigger".label attribute. Use hide-label to hide it visually.aria-label, aria-labelledby and aria-describedby on a <kernel-*> tag are forwarded to the real control inside it (get_component lists them under "Forwarded to the native control"). A <kernel-switch> is named by its text content; with no visible text, give the tag aria-label="Bill yearly", or aria-labelledby pointing at text beside it.id stays on the tag. document.getElementById("uploader") returns the <kernel-file-upload> itself, the element whose events you listen to. The inner control gets <id>-control.<h1> per page. No Kernel tag renders the page heading, so add it yourself; axe flags a page without one.<svg> or <img> first or last inside <kernel-button>, <kernel-badge> or <kernel-suggestion-item>; mark any other icon element with data-icon. Give an icon-only <kernel-button> an aria-label.--kernel-* tokens only, never hard-coded colours or radii. The component class names (kernel-Button-root…) are the same in the React package.@kernelui-lib/react is usually the better fit there.<kernel-file-upload> validates accept, max-size (bytes) and max-files itself but doesn't show a message: it dispatches kernel-file-upload-error and leaves the wording to you. Its own change fires only when the selection changes (an accepted pick or drop, or a removal), so it's the place to clear the error.
<kernel-file-upload id="documents" label="Documents" accept="image/*,.pdf" multiple max-size="5242880"></kernel-file-upload>
<script type="module">
const upload = document.getElementById("documents");
upload.addEventListener("kernel-file-upload-error", (event) => {
// detail: { type: "accept" | "max-size" | "max-files" | "directory", files: File[] }
const { type, files } = event.detail;
const messages = {
"max-size": `${files[0].name} is over 5 MB.`,
accept: `${files[0].name} isn't an image or a PDF.`,
"max-files": "Too many files.",
directory: "Folders can't be uploaded.",
};
upload.setAttribute("error-message", messages[type]);
upload.setAttribute("invalid", "");
});
upload.addEventListener("change", () => {
upload.removeAttribute("invalid");
upload.removeAttribute("error-message");
const files = [...upload.querySelector("input[type=file]").files];
// start uploads for `files`
});
</script>
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
4 skills in this plugin
/kernel-uiBuild 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./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