ki-note
@kimen/elements/ki-note- Source
- Agent reference
Use a note for a short constraint, tip or consequence. Place it beside the control or passage it explains. Put the consequence first in warnings.
<ki-note>Only workspace owners can change billing details.</ki-note><ki-note tone="warning" size="sm">Changing the slug breaks existing links.</ki-note><ki-note icon="false">Billing statements remain available for one year.</ki-note>Icons and accessibility
The note is static text. It adds no landmark, announcement or tab stop. The icon is decorative. Use words that convey the message by themselves.
Supply a decorative glyph through the icon slot. Set icon="false" in HTML
or element.icon = false in JavaScript to hide the icon and reclaim its space.
Use ki-alert for updates that must be announced, Toast for transient
confirmations and the field’s help-text for field guidance.
API reference
When to use: Add a short constraint, tip or consequence next to the content it explains. Put the consequence first when warning the reader.
When not to use: For updates that must be announced, use ki-alert. Use Toast for transient confirmations and the field's help-text for field guidance.
Properties & attributes
| Attribute | Property | Type | Default | Description |
|---|---|---|---|---|
icon | icon | boolean | true | Shows the decorative icon. Set icon="false" in HTML to hide it. |
size | size | "md" | "sm" | 'md' | Uses caption text at sm and body text at md. Unknown values use md. |
tone | tone | "danger" | "info" | "neutral" | "primary" | "success" | "warning" | 'neutral' | Selects the background tint and decorative icon. Unknown values use neutral. |
Slots
| Slot | Description |
|---|---|
| (default) | Short explanatory text that carries the full meaning. |
icon | A decorative glyph that replaces the tone's built-in icon. |
CSS parts
| Part | Description |
|---|---|
icon | The decorative icon frame. |
message | The explanatory text. |
note | The surface, including the tint, typography and spacing. |
CSS custom properties
The public styling contract of ki-note: reassign these tokens at :root or on a subtree — never override internals.
| Token | Description |
|---|---|
--ki-density-space-scale | Multiplies every scaled container padding and gap (card, dialog, alert, list, list item, select listbox, tab panel, tooltip). |
--ki-note-backdrop-filter | Complete filter behind the note. |
--ki-note-bg | Background of a neutral note. |
--ki-note-bg-image | Optional image over the note's solid background. |
--ki-note-danger-bg | Background of a danger note. |
--ki-note-danger-fg | Text ink of a danger note. |
--ki-note-danger-icon | Decorative icon ink of a danger note. |
--ki-note-fg | Text ink of a neutral note. |
--ki-note-font-family | Note text font family. |
--ki-note-font-size | Medium note text size. |
--ki-note-gap | Space between the icon and the text. |
--ki-note-icon | Decorative icon ink of a neutral note. |
--ki-note-icon-offset | Medium icon offset from the first line's block start. |
--ki-note-icon-size | Medium note icon size. |
--ki-note-info-bg | Background of an info note. |
--ki-note-info-fg | Text ink of an info note. |
--ki-note-info-icon | Decorative icon ink of an info note. |
--ki-note-line-height | Medium note text line height. |
--ki-note-padding-block | Medium note block padding. |
--ki-note-padding-inline | Medium note inline padding. |
--ki-note-primary-bg | Background of a primary note. |
--ki-note-primary-fg | Text ink of a primary note. |
--ki-note-primary-icon | Decorative icon ink of a primary note. |
--ki-note-radius | Note surface corner radius. |
--ki-note-sm-font-size | Small note caption size. |
--ki-note-sm-icon-offset | Small icon offset from the first line's block start. |
--ki-note-sm-icon-size | Small note icon size. |
--ki-note-sm-line-height | Small note caption line height. |
--ki-note-sm-padding-block | Small note block padding. |
--ki-note-sm-padding-inline | Small note inline padding. |
--ki-note-success-bg | Background of a success note. |
--ki-note-success-fg | Text ink of a success note. |
--ki-note-success-icon | Decorative icon ink of a success note. |
--ki-note-warning-bg | Background of a warning note. |
--ki-note-warning-fg | Text ink of a warning note. |
--ki-note-warning-icon | Decorative icon ink of a warning note. |