Badge

Ein Badge stellt kompakt zusätzliche Informationen wie Metadaten, Status oder Kategorien dar.GitHubMarkdown

Properties

PropertyTypeDescription
color
darklightdark-staticlight-staticneutralvioletgreenblueteallilacnavyorangeredDefault: "neutral"
The color of the badge.
isDisabled
boolean
Whether the badge is disabled.
children
ReactNode
wrapWith
ReactElement<unknown, string | JSXElementConstructor<any>>
ref
Ref<HTMLSpanElement>
Allows getting a ref to the component instance. Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref). @see React Docs
key
Key
className
string
The elements class name.

Events

PropertyTypeDescription
onPress
((e: PressEvent) => void)
Handler that is called when the badge is pressed.
onClose
((e: PressEvent) => void)
Handler that is called when the badges close icon is pressed.

Auf dieser Seite