Icon API
import { Icon } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
absoluteStrokeWidth | boolean | |
badge | boolean | |
children | React.ReactNode | |
color | string | |
decorative | boolean | |
flip | 'horizontal' | 'vertical' | 'both' | |
iconVariant | 'outline' | 'solid' | 'duotone' | |
iconWeight | 'thin' | 'regular' | 'bold' | |
label | string | |
name | string | |
pulse | boolean | |
rotate | number | |
rtl | boolean | |
secondaryColor | string | |
shape | 'default' | 'square' | 'soft' | |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | string | number | |
spin | boolean | |
strokeLinecap | 'butt' | 'round' | 'square' | |
strokeLinejoin | 'miter' | 'round' | 'bevel' | |
strokeWidth | number | string | |
tone | 'default' | 'brand' | 'success' | 'warning' | 'danger' | |
variant | 'default' | 'surface' | 'soft' | 'contrast' | 'minimal' | 'elevated' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-icon>
Icon renders the ui-icon custom element from @editora/ui-core, which can also be used without React.
Attributes: absolute-stroke-width, badge, color, decorative, flip, headless, icon-variant, icon-weight, label, name, pulse, rotate, rtl, secondary-color, shape, size, spin, stroke-linecap, stroke-linejoin, stroke-width, tone, variant
Events: iconchange