HkIconChip is the standard leading icon chip: a small rounded square painted in a 12% tint of a tone colour, with that same tone as the glyph ink. It is the anatomy that used to be copy-pasted as inline styles across roster rows, card headers and stat strips — now one component, one palette. The chip is purely decorative by contract: its root is aria-hidden="true", so the meaning of the glyph must be carried by the text beside it.
The tone palette is the one the stat card owns (primary / info / success / warning / error / muted), so a chip inside a stat card always matches that card's own health colour.
When the glyph is the action, the control is an HkIconButton; a chip never takes focus and never fires an event.
A glyph that needs its own accessible name belongs in a labelled control, not in the chip: the chip is skipped by assistive technology on purpose.
Six tones, primary by default. The tone drives both channels at once: the background is a 12% wash of the tone colour and the glyph is painted in that colour, so a chip never reads as a grey box with a coloured mark. The Vue icon prop takes a component (a lucide export); the Rust prop is a typed MdiIcon.
Two box steps: md (the default) is a 28px square with a 15px glyph, and sm is a 24px square with a 13px glyph — the step that fits inside a dense table row. The glyph is scaled by the component, not the caller, so the two steps stay in proportion.
Small chips sit on the same baseline as a dense row's text.
Small chips sit on the same baseline as a dense row's text.
rsx!{
div { style:"display:flex;gap:16px;align-items:center",
IconChip { icon:MdiIcon::Package, size:IconChipSize::Md }
IconChip { icon:MdiIcon::Package, size:IconChipSize::Sm }
IconChip { icon:MdiIcon::Table, size:IconChipSize::Sm, tone:IconChipTone::Info }
span {"Small chips sit on the same baseline as a dense row's text."}}}
import { HkIconChip } from "@celestia-island/hikari";
import { Coins, Server } from "lucide-vue-next";
import type { CSSProperties } from "vue";
const row: CSSProperties = { display: "flex", gap: "16px", alignItems: "center" };
export default () => (
<div style={row}>
<HkIconChip icon={Coins} size="md" />
<HkIconChip icon={Coins} size="sm" />
<HkIconChip icon={Server} size="sm" tone="info" />
<span>Small chips sit on the same baseline as a dense row's text.</span>
</div>
);
rsx! {
div { style: "display:flex;gap:16px;align-items:center",
IconChip { icon: MdiIcon::Package, size: IconChipSize::Md }
IconChip { icon: MdiIcon::Package, size: IconChipSize::Sm }
IconChip { icon: MdiIcon::Table, size: IconChipSize::Sm, tone: IconChipTone::Info }
span { "Small chips sit on the same baseline as a dense row's text." }
}
}
API
Vue
Props
Name
Type
Default
Required
icon
[Object, Function] as PropType<Component>
—
✓
tone
String as PropType<StatTone>
"primary"
—
size
<code>String as PropType<"sm" | "md"></code>
"md"
—
Rust
Props — IconChip
Prop
Type
Default
Description
icon
MdiIcon
MdiIcon::Help
The glyph (Rust: a typed MDI icon — Vue passes a component).
tone
IconChipTone
IconChipTone::Primary
—
size
IconChipSize
IconChipSize::Md
—
Accessibility
The chip's root carries aria-hidden="true", so the glyph never reaches the accessibility tree as a nameless image. The text beside it — the row title, the card label — is what names the thing.
Nothing inside the chip is focusable and the chip emits no events, so it adds no stop to the Tab order and never steals a click from its row.
A tone is a colour channel only: it encodes no text for assistive technology. When a state must be announced, put the words in the adjacent text, not in the chip's ink.
Related components
HkIconButton — the clickable counterpart when the glyph itself is the action.
HkStatusRow — the row that mounts a chip in its leading slot and shades it with the row's own tone.
HkStatusPill — the compact health readout, when the state needs a dot and words rather than an icon.