Skip to content

Icon

<ts-icon> vv0.4.0

The ts-icon component.

Open in Storybook for interactive demos.

<ts-icon color="currentColor" size="md">Content</ts-icon>
PropertyAttributeTypeDefaultDescription
colorcolorstring'currentColor'CSS color value applied to the icon.
labellabelstring | undefinedAccessible label. When set, applies role=“img” and aria-label. When absent, sets aria-hidden=“true”.
namenamestring | undefinedIcon name — resolves from custom registry first, then built-in Lucide icons. Accepts kebab-case or PascalCase.
sizesize"lg" | "md" | "sm" | "xl" | "xs"'md'The icon’s size.
srcsrcstring | undefinedURL to an external SVG icon file.
NameDescription
*(default)*Default slot for inline SVG content.

Use ::part() to style internal elements:

PartDescription
imgThe img element (when using src prop).
svgThe container for resolved SVG content (when using name prop).
ts-icon::part(img) {
/* your custom styles */
}
<ts-icon color="currentColor" size="md">Content</ts-icon>
import { TsIcon } from '@tessera-ui/react';
<TsIcon color="currentColor" size="md">Content</TsIcon>