Components / Icon
Icon
SVG icon component with built-in common icons. No external icon library needed.
data-display v0.1.0
Playground
Examples
Icons
<cg-stack direction="row" gap="md"><cg-icon name="check"></cg-icon><cg-icon name="x"></cg-icon><cg-icon name="arrow-right"></cg-icon><cg-icon name="star"></cg-icon></cg-stack> Import
import { CgIcon } from '@cognivo/components'; // Or tree-shake: import '@cognivo/components/cg-icon'; Per-component imports ship only that component (~8 kB gzip).
API Reference
| Prop | Type | Default | Description |
|---|---|---|---|
name | string | "star" | Icon name (check, x, arrow-right, etc.) |
size | "xs" | "sm" | "md" | "lg" | "xl" | "md" | Icon size |
color | "current" | "muted" | "accent" | "success" | "warning" | "danger" | "info" | "current" | Icon color |