Skip to main content
Version: Next

Icon API

import { Icon } from '@editora/ui-react';

Props​

PropTypeDescription
absoluteStrokeWidthboolean
badgeboolean
childrenReact.ReactNode
colorstring
decorativeboolean
flip'horizontal' | 'vertical' | 'both'
iconVariant'outline' | 'solid' | 'duotone'
iconWeight'thin' | 'regular' | 'bold'
labelstring
namestring
pulseboolean
rotatenumber
rtlboolean
secondaryColorstring
shape'default' | 'square' | 'soft'
size'xs' | 'sm' | 'md' | 'lg' | 'xl' | string | number
spinboolean
strokeLinecap'butt' | 'round' | 'square'
strokeLinejoin'miter' | 'round' | 'bevel'
strokeWidthnumber | 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