Skip to content

cv-icon

Reusable icon renderer backed by the UIKit icon registry.

Usage

View source
html
<div data-demo="icon" data-live-demo-height="240">
  <cv-icon name="lock" color="primary" label="Locked"></cv-icon>
  <cv-icon name="check" color="success" size="l" label="Complete"></cv-icon>
</div>

Anatomy

<cv-icon> (host)
└── <span class="icon">
    ├── loaded SVG markup
    └── <slot> fallback or consumer-provided SVG

Attributes

AttributeTypeDefaultDescription
nameString""Registered icon name
srcString-Explicit SVG asset URL
sizeString"m"Preset size: xs, s, m/md, or l/lg
colorString"default"default, muted, primary, success, warning, danger
labelString-Accessible label; omitted icons are decorative
fillBooleanfalseUses the current foreground as SVG fill

Logical direction aliases

UIKit provides semantic aliases for icons whose meaning follows the inline reading direction:

Semantic nameLTR physical assetRTL rendering
chevron-inline-startchevron-leftMirrored toward inline-start
chevron-inline-endchevron-rightMirrored toward inline-end
arrow-inline-startarrow-leftMirrored toward inline-start
arrow-inline-endarrow-rightMirrored toward inline-end

Physical names such as chevron-left, chevron-right, arrow-left, and arrow-right remain physical and are never mirrored. Namespaced third-party collection names are not treated as UIKit semantic aliases.

Slots

SlotDescription
(default)Consumer-provided SVG or fallback while loading fails

CSS Custom Properties

PropertyDefaultDescription
--cv-icon-size1emIcon inline and block size

Events

None. The component is presentational.

ChromVoid UIKit documentation