Badge API
import { Badge } from '@editora/ui-react';
Props
| Prop | Type | Description |
|---|---|---|
autoRemove | boolean | |
children | React.ReactNode | |
disabled | boolean | |
dot | boolean | |
elevation | 'none' | 'low' | 'high' | |
iconOnly | boolean | |
interactive | boolean | |
maxWidth | string | |
onRemove | (detail: BadgeRemoveDetail) => void | |
pill | boolean | |
radius | 'none' | 'sm' | 'md' | 'lg' | 'large' | 'full' | number | string | |
removable | boolean | |
size | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '1' | '2' | '3' | |
state | 'idle' | 'loading' | 'error' | 'success' | |
text | string | |
tone | 'brand' | 'neutral' | 'info' | 'success' | 'warning' | 'danger' | 'purple' | |
truncate | boolean | |
variant | 'surface' | 'solid' | 'soft' | 'outline' | 'ghost' |
Also accepts the standard HTML and React props of the element it renders (className, style, id, aria-*, data-*, event handlers).
Element: <ui-badge>
Badge renders the ui-badge custom element from @editora/ui-core, which can also be used without React.
Attributes: auto-remove, disabled, dot, elevation, headless, icon-only, interactive, max-width, pill, radius, removable, size, state, text, tone, truncate, variant
Events: remove, ui-remove