Skip to content

Icon ​

Icon draws a line icon in the color of the text around it.

When to use ​

Use it beside text, in a button or at the start of a list item. name takes a name from the icons or any icon component, such as a Lucide icon. A button that shows only an icon needs an aria-label.

Props ​

PropDefaultDescription
namerequiredA name from icons, or an icon component
toneblue, yellow, red, green or muted

Contract ​

An icon is a square of --kata-height-icon (the root size) with a stroke of 1.5, in currentColor unless a tone gives it the ink of a hue or the muted color. It never shrinks and has no margin; flex layout centres it. Its white space is never cancelled with a negative margin.

Icons ​

icons holds the icons the components draw by name. Most come from Lucide; the drawing glyphs are kata's own, drawn on the same grid for the shapes Lucide does not have.

NameDrawn by
arrow-downLucide
arrow-leftLucide
arrow-up-rightLucide
checkLucide
chevron-downLucide
chevron-leftLucide
chevron-rightLucide
circle-alertLucide
circle-checkLucide
copyLucide
corner-up-rightLucide
ellipsisLucide
funnelLucide
globeLucide
grip-verticalLucide
imageLucide
infoLucide
pencilLucide
pipetteLucide
plusLucide
searchLucide
settings-2Lucide
share-2Lucide
trash-2Lucide
triangle-alertLucide
ungroupLucide
xLucide
eyeLucide
eye-offLucide
lockLucide
lock-openLucide
undo-2Lucide
pointkata
polylinekata
polygonkata
arrowkata
sticky-notekata

Example ​

Icon

Released under the Apache-2.0 license.