# @kimen/elements — Kimen web components > Kimen web components (ki-*). Standards-first Stencil components, tokens-only styling, agent-legible by contract. Install with `pnpm add @kimen/elements @kimen/tokens`. Register each component before using it. Every component is exported from `@kimen/elements/`, the way `ki-button` is here: ```ts import { defineCustomElement as defineKiButton } from '@kimen/elements/ki-button'; import '@kimen/tokens/css'; import '@kimen/tokens/css/base'; defineKiButton(); ``` Load `@kimen/tokens/css` once per page: it is the onmars default theme and the only stylesheet the components require. It declares every `--ki-*` token for both schemes together with the `color-scheme` they resolve from, so a page follows its visitor's light or dark preference with no further setup. `@kimen/tokens/css/base` — the page contract — is optional: it paints the page background, text color and body font from those tokens and declares no color scheme of its own. Without it the page keeps the browser's own canvas and text color for the active scheme, and every component stays legible on it. Human-readable documentation: https://kimen.dev/docs/ Above the components sits Kimen's GenUI layer: agents emit JSON UI specs (data, never code), the neutral catalog validates them against the published component surface, and the guarded renderer turns accepted specs into DOM. Protocol adapters translate external vocabularies into that neutral core and are disposable by design; the catalog and the ki-* elements are the durable assets. These packages live in this repository next to @kimen/elements. This file is an index: read it first, then only the documents the task needs. Each entry under Components says when to use that component; its document is the complete contract — attributes, slots, parts, events, methods, CSS custom properties and examples. ## Components - [ki-accordion](https://kimen.dev/llms/ki-accordion.md): group related FAQ answers, settings or expandable sections. - [ki-ai-label](https://kimen.dev/llms/ki-ai-label.md): Mark text or a value generated by AI. - [ki-alert](https://kimen.dev/llms/ki-alert.md): show a persistent inline message about the state of a page or section, such as a failed save, completed operation, or service notice, that remains until the condition is resolved or the person dismisses it. - [ki-audio](https://kimen.dev/llms/ki-audio.md): play a voice note, interview, or other prerecorded audio that a person deliberately starts. - [ki-avatar](https://kimen.dev/llms/ki-avatar.md): a compact identity visual for a person or entity — a comment author, a contact list item, a project member. - [ki-avatar-group](https://kimen.dev/llms/ki-avatar-group.md): a compact "who is involved" stack — the members of a shared document, project card or event row — where space deserves only the first few identities and an exact "+N" counter accounts for the rest. - [ki-badge](https://kimen.dev/llms/ki-badge.md): annotate an entity with short status text (a state, a category) whose meaning is carried by the label itself; the tone color only reinforces the text, it never replaces it. - [ki-breadcrumb](https://kimen.dev/llms/ki-breadcrumb.md): show the current page in a deeper hierarchy using direct ki-breadcrumb-item children ordered from root to current. - [ki-breadcrumb-item](https://kimen.dev/llms/ki-breadcrumb-item.md): declare a direct child of ki-breadcrumb in hierarchy order. - [ki-button](https://kimen.dev/llms/ki-button.md): trigger the single main action of a view, supporting actions in descending hierarchy, confirming/destructive actions through tone, or persistent actions such as Bold with `toggle`. - [ki-button-group](https://kimen.dev/llms/ki-button-group.md): place two to five related actions together, present a primary action with a menu of alternatives, or give formatting tools one Tab stop. - [ki-card](https://kimen.dev/llms/ki-card.md): group related media, a title, supporting text and actions into one scannable surface. - [ki-carousel](https://kimen.dev/llms/ki-carousel.md): show a short set of related highlights, onboarding steps or media panels. - [ki-carousel-item](https://kimen.dev/llms/ki-carousel-item.md): supply a single slide to a ki-carousel. - [ki-checkbox](https://kimen.dev/llms/ki-checkbox.md): selecting one or more independent options that a form submits later, including a "select all" parent that presents partial selection with `indeterminate`. - [ki-checkbox-group](https://kimen.dev/llms/ki-checkbox-group.md): people may select several visible options that share a question, form field, and optional selection limits. - [ki-chip](https://kimen.dev/llms/ki-chip.md): apply independent filters, represent values selected in an entry field, or offer a small contextual action alongside content. - [ki-chip-group](https://kimen.dev/llms/ki-chip-group.md): label related chips or let people change their reading order. - [ki-citation](https://kimen.dev/llms/ki-citation.md): Next to a claim supported by a `ki-source` in the same document or shadow root. - [ki-code-block](https://kimen.dev/llms/ki-code-block.md): display a multiline example, generated code or a tool result that readers should be able to inspect and copy. - [ki-code-input](https://kimen.dev/llms/ki-code-input.md): Collect a one-time code of four to eight characters for sign-in or verification. - [ki-combobox](https://kimen.dev/llms/ki-combobox.md): choose from a long list of options, let people search an option source, or allow multiple selections that remain visible as tags. - [ki-confirmation](https://kimen.dev/llms/ki-confirmation.md): Show the exact action and the details a person needs before granting permission. - [ki-conversation](https://kimen.dev/llms/ki-conversation.md): Display chronological user, assistant and event messages. - [ki-copy-button](https://kimen.dev/llms/ki-copy-button.md): let a person copy a link, identifier, token or code sample. - [ki-counter](https://kimen.dev/llms/ki-counter.md): mark unread or pending items on a trigger, or presence on an avatar. - [ki-date-picker](https://kimen.dev/llms/ki-date-picker.md): Choose a nearby date or date range when the weekday matters, such as a booking, a deadline or a schedule. - [ki-details](https://kimen.dev/llms/ki-details.md): reveal a short explanation, FAQ answer, settings section or tool output on demand. - [ki-dialog](https://kimen.dev/llms/ki-dialog.md): destructive confirmations, blocking choices, and brief critical input that must be resolved before returning to the page. - [ki-divider](https://kimen.dev/llms/ki-divider.md): visually separate adjacent content when spacing alone is not enough: grouped settings sections, toolbar action groups, distinct regions inside a card — horizontal between stacked content, vertical between side-by-side content. - [ki-drawer](https://kimen.dev/llms/ki-drawer.md): Edit an item beside its list or offer a short set of actions in a bottom sheet. - [ki-empty-state](https://kimen.dev/llms/ki-empty-state.md): explain an empty list, table, search result, or first-run view. - [ki-fab](https://kimen.dev/llms/ki-fab.md): give a mobile screen one primary action, such as composing a draft or creating a project. - [ki-fab-menu](https://kimen.dev/llms/ki-fab-menu.md): group related creation or screen actions behind one floating button. - [ki-fab-menu-item](https://kimen.dev/llms/ki-fab-menu-item.md): as a direct child of ki-fab-menu, with a short, visible action label. - [ki-feature-icon](https://kimen.dev/llms/ki-feature-icon.md): Place a decorative icon beside the visible heading of a feature, empty state or settings section. - [ki-file-upload](https://kimen.dev/llms/ki-file-upload.md): collect local attachments, media or imports, and optionally show application-managed upload progress and results. - [ki-format-date](https://kimen.dev/llms/ki-format-date.md): For raw date and timestamp values in tables, records and prose. - [ki-format-number](https://kimen.dev/llms/ki-format-number.md): For numeric data, currency amounts, ratios and measurements in content. - [ki-grid](https://kimen.dev/llms/ki-grid.md): lay out items on responsive tracks with consistent token spacing. - [ki-icon](https://kimen.dev/llms/ki-icon.md): show a named glyph next to text, or give a standalone meaningful glyph an accessible label. - [ki-icon-button](https://kimen.dev/llms/ki-icon-button.md): a compact, widely understood action where space precludes a visible label: toolbars, card and dialog corners (close), media transport, data-row actions. - [ki-image](https://kimen.dev/llms/ki-image.md): to show a photo, illustration, or diagram with a predictable layout. - [ki-indicator](https://kimen.dev/llms/ki-indicator.md): show the current position within a bounded, sequential set of peer views whose navigation lives elsewhere: carousel slides, unlabeled onboarding steps, gallery pages. - [ki-input](https://kimen.dev/llms/ki-input.md): collect one line of free text from a person, always with a visible `label`; choose the `type` and `autocomplete` that match the entry purpose. - [ki-link](https://kimen.dev/llms/ki-link.md): navigate to a page, section, or resource. - [ki-list](https://kimen.dev/llms/ki-list.md): settings, contacts, results, navigation or visible choices composed from primary text, supporting text and optional media. - [ki-list-item](https://kimen.dev/llms/ki-list-item.md): as a direct child of `ki-list`, for a static entry, link, selection option, or a settings row with one control. - [ki-markdown](https://kimen.dev/llms/ki-markdown.md): Show a formatted reply, readme excerpt or progressively received text from a person or model. - [ki-menu](https://kimen.dev/llms/ki-menu.md): row actions, account commands, split buttons, and overflow actions. - [ki-menu-group](https://kimen.dev/llms/ki-menu-group.md): name a set of related actions or scope exclusive radio items in a menu. - [ki-menu-item](https://kimen.dev/llms/ki-menu-item.md): a command, independent checkbox action, or exclusive radio action in a menu. - [ki-message](https://kimen.dev/llms/ki-message.md): Display an entry in ki-conversation. - [ki-mobile-nav](https://kimen.dev/llms/ki-mobile-nav.md): Place after the main content of a narrow layout. - [ki-mobile-nav-item](https://kimen.dev/llms/ki-mobile-nav-item.md): Place directly in ki-mobile-nav. - [ki-note](https://kimen.dev/llms/ki-note.md): Add a short constraint, tip or consequence next to the content it explains. - [ki-number-input](https://kimen.dev/llms/ki-number-input.md): Collect a number like a quantity, amount, or limit. - [ki-option](https://kimen.dev/llms/ki-option.md): declare one choice inside a `ki-select` or `ki-combobox`; its text is the human-facing label and its `value` is the submitted value. - [ki-pagination](https://kimen.dev/llms/ki-pagination.md): paged tables, search results or long lists. - [ki-popover](https://kimen.dev/llms/ki-popover.md): Show filters, details, a small form, or an explanation opened by click. - [ki-progress](https://kimen.dev/llms/ki-progress.md): communicate advancement of an ongoing task such as upload, download, installation or multi-step processing. - [ki-prompt-input](https://kimen.dev/llms/ki-prompt-input.md): Compose a message to an assistant, optionally attach local files, and let people interrupt the assistant's response. - [ki-qr](https://kimen.dev/llms/ki-qr.md): hand a URL or machine-readable payload from the screen to a nearby camera device: login pairing, tickets and passes, "continue on mobile" links, Wi-Fi sharing. - [ki-radio](https://kimen.dev/llms/ki-radio.md): place inside `ki-radio-group` when a person must choose exactly one of a small visible set. - [ki-radio-group](https://kimen.dev/llms/ki-radio-group.md): a person must choose exactly one of a small set of mutually exclusive options that should all be visible at once. - [ki-rating](https://kimen.dev/llms/ki-rating.md): Show an average review score in readonly mode or ask people to rate an answer, experience, or product on a small scale. - [ki-reasoning](https://kimen.dev/llms/ki-reasoning.md): present assistant-supplied steps, progress or a completed plan alongside the answer. - [ki-relative-time](https://kimen.dev/llms/ki-relative-time.md): For timestamps whose distance from the present matters, such as timeline entries or recent changes. - [ki-scroller](https://kimen.dev/llms/ki-scroller.md): a bounded region inside a view whose content can outgrow it: chat or message panes, code and log blocks, tag rows, sidebar navigation, tall menus inside cards. - [ki-search](https://kimen.dev/llms/ki-search.md): accept free-text searches and let the user run a typed or suggested query. - [ki-search-suggestion](https://kimen.dev/llms/ki-search-suggestion.md): supply one suggested or recent query as a direct ki-search child. - [ki-segment](https://kimen.dev/llms/ki-segment.md): offer one mutually exclusive choice with text or a named icon. - [ki-segmented-control](https://kimen.dev/llms/ki-segmented-control.md): apply a chart range, view mode, or another immediate setting. - [ki-select](https://kimen.dev/llms/ki-select.md): choose exactly one value from a known closed list, especially when there are roughly five or more choices or space is limited. - [ki-sidebar](https://kimen.dev/llms/ki-sidebar.md): navigate more than five top-level destinations or organize application destinations in named groups. - [ki-sidebar-group](https://kimen.dev/llms/ki-sidebar-group.md): give related sidebar destinations a common heading. - [ki-sidebar-item](https://kimen.dev/llms/ki-sidebar-item.md): link to a named destination in ki-sidebar or ki-sidebar-group. - [ki-skeleton](https://kimen.dev/llms/ki-skeleton.md): Reserve the expected layout of a card, list, or assistant reply while it loads. - [ki-slider](https://kimen.dev/llms/ki-slider.md): coarse adjustments such as volume, balance or a price filter, with a descriptive label. - [ki-source](https://kimen.dev/llms/ki-source.md): As a direct child of `ki-sources`. - [ki-sources](https://kimen.dev/llms/ki-sources.md): To show the evidence behind an answer. - [ki-spinner](https://kimen.dev/llms/ki-spinner.md): show brief inline activity such as saving a change or running a tool. - [ki-stack](https://kimen.dev/llms/ki-stack.md): arrange content in a vertical sequence or a horizontal row with consistent token spacing. - [ki-stat](https://kimen.dev/llms/ki-stat.md): Summarize one numeric metric in a dashboard or report. - [ki-status](https://kimen.dev/llms/ki-status.md): mark a state with minimal footprint adjacent to (or overlaid on) the item it describes: presence on an avatar, health of a service list entry, connection state in a toolbar. - [ki-step](https://kimen.dev/llms/ki-step.md): Place directly inside ki-stepper in task order. - [ki-stepper](https://kimen.dev/llms/ki-stepper.md): Show the current place in onboarding, checkout or a wizard. - [ki-suggestion](https://kimen.dev/llms/ki-suggestion.md): offer one short, actionable prompt in a suggestion group. - [ki-suggestions](https://kimen.dev/llms/ki-suggestions.md): offer suggested prompts to start or continue an assistant conversation. - [ki-switch](https://kimen.dev/llms/ki-switch.md): binary settings whose change takes effect immediately, always with a slotted label. - [ki-tab](https://kimen.dev/llms/ki-tab.md): label one peer content view inside `ki-tabs`, with optional decorative `icon` and `start` or `end` slot media. - [ki-tab-panel](https://kimen.dev/llms/ki-tab-panel.md): hold the content for one peer tab view, sharing `value` with its `ki-tab`. - [ki-table](https://kimen.dev/llms/ki-table.md): Show records with shared fields that people compare, scan or sort. - [ki-tabs](https://kimen.dev/llms/ki-tabs.md): switch between small sets of peer views inside the same page, with one visible panel at a time. - [ki-textarea](https://kimen.dev/llms/ki-textarea.md): free-form text longer than one line, such as comments, descriptions, messages, delivery notes, or addresses when paired with a matching `autocomplete` purpose. - [ki-time-input](https://kimen.dev/llms/ki-time-input.md): collect an exact time of day or offer regular appointment slots. - [ki-timeline](https://kimen.dev/llms/ki-timeline.md): present chronological events with independently readable summaries, optional times and details, including new entries in a live feed. - [ki-timeline-item](https://kimen.dev/llms/ki-timeline-item.md): describe an activity, audit, or run event inside a ki-timeline. - [ki-toast](https://kimen.dev/llms/ki-toast.md): confirm an action that happened elsewhere on screen ("Changes saved", "Link copied"), report a background result ("Export ready"), or offer a quick undo. - [ki-toaster](https://kimen.dev/llms/ki-toaster.md): once per page (or once inside a modal `ki-dialog`), as the place every `ki-toast` of the application appears in: append toasts to it, or call `show()`. - [ki-tool-call](https://kimen.dev/llms/ki-tool-call.md): show which tool ran, its state and duration, and let the reader inspect the supplied input, output or error. - [ki-toolbar](https://kimen.dev/llms/ki-toolbar.md): group a small set of related page actions, such as text formatting or the commands on a compact message screen. - [ki-tooltip](https://kimen.dev/llms/ki-tooltip.md): add a brief clarifying hint for an icon-only, abbreviated, or otherwise ambiguous control when the same information is discoverable elsewhere in the interface. - [ki-top-nav](https://kimen.dev/llms/ki-top-nav.md): group a brand, up to five primary sections and global controls, or set a screen title, leading control and screen actions in app-bar mode. - [ki-tree](https://kimen.dev/llms/ki-tree.md): browse nested files, categories or an outline, select items in a hierarchy, or navigate through linked destinations. - [ki-tree-item](https://kimen.dev/llms/ki-tree-item.md): label a file, category or destination in a hierarchy. - [ki-video](https://kimen.dev/llms/ki-video.md): playable content the person deliberately chooses to watch — product tours, talks, tutorials, announcements — presented as a poster with one play control. ## Generative UI - [@kimen/catalog](https://kimen.dev/llms/catalog.md): Any boundary where agent-emitted JSON must become Kimen UI: validate specs standalone, render them with the guardrail enforced, stream them progressively, or keep a long-lived surface current with id-addressed batches. - [@kimen/emitter](https://kimen.dev/llms/emitter.md): Configure ANY LLM to emit valid Kimen UI specs: derive a system prompt, a catalog-specialized JSON Schema (with provider-strict lowerings) or a tool definition from the catalog in use — built-in or registered — and close the reliability loop with normalization and a single-round repair message. - [@kimen/adapter-a2ui](https://kimen.dev/llms/adapter-a2ui.md): Your agent runtime speaks the A2UI protocol and its surfaces should render as Kimen components with the guardrail enforced. - [@kimen/adapter-mcp-apps](https://kimen.dev/llms/adapter-mcp-apps.md): You ship an MCP server and want tool results to render as interactive Kimen surfaces in MCP Apps (SEP-1865) hosts. ## Guides - [Theming](https://kimen.dev/llms/theming.md): All themes reassign the same `--ki-*` custom properties, so switching themes restyles every component with no code changes. - [Agent setup](https://kimen.dev/llms/agent-setup.md): Coding agents can install the Kimen agent skills (`kimen-components` for pages built with these components, `kimen-genui` for agent-generated UI) and connect the `kimen-mcp` server, which lists and describes the catalog, validates UI specs and renders them. ## Optional - [llms-full.txt](https://kimen.dev/llms-full.txt): everything in one file — this guidance and every component contract. Large: fetch it only when the whole library is needed at once. - [custom-elements.json](https://kimen.dev/assets/elements/custom-elements.json): the same component contracts as a Custom Elements Manifest (JSON).