Beispiele
Das Label wird z.B. beim TextField, LabeledValue oder Switch verwendet.
Verwende <Label />
, um ein Label anzuzeigen. Labels werden häufig innerhalb
von anderen Komponenten eingesetzt.
import { Label } from "@mittwald/flow-react-components"; <Label>Label</Label>
Das Label hat 2 verschiedene States: Default und Disabled.
import { Label } from "@mittwald/flow-react-components"; <Row> <Label>Default</Label> <Label isDisabled>Disabled</Label> </Row>
Disabled: Das Label wird häufig zur Beschreibung komplexerer Komponenten verwendet. Daher übernimmt es automatisch den State, den die höhere Komponente hat. Ist zum Beispiel ein TextField oder NumberField gerade disabled, nimmt das Label den gleichen State an.
Property | Type | Default | Description |
---|---|---|---|
optional | boolean | - | Whether the label should show an "optional" indicator. |
isDisabled | boolean | - | Whether the label should be displayed as disabled. |
unstyled | boolean | - | |
dangerouslySetInnerHTML | { __html: string | TrustedHTML; } | - | |
suppressHydrationWarning | boolean | - | |
className | string | - | |
color | string | - | |
id | string | - | |
lang | string | - | |
style | CSSProperties | - | |
role | AriaRole | - | |
tabIndex | number | - | |
autoFocus | boolean | - | |
defaultValue | string | number | readonly string[] | - | |
slot | string | - | |
elementType | string | - | |
defaultChecked | boolean | - | |
suppressContentEditableWarning | boolean | - | |
accessKey | string | - | |
autoCapitalize | "none" | "off" | (string & {}) | "on" | "sentences" | "words" | "characters" | - | |
contentEditable | Booleanish | "inherit" | "plaintext-only" | - | |
contextMenu | string | - | |
dir | string | - | |
draggable | Booleanish | - | |
enterKeyHint | "search" | "enter" | "done" | "go" | "next" | "previous" | "send" | - | |
hidden | boolean | - | |
nonce | string | - | |
spellCheck | Booleanish | - | |
title | string | - | |
translate | "yes" | "no" | - | |
radioGroup | string | - | |
about | string | - | |
content | string | - | |
datatype | string | - | |
inlist | any | - | |
prefix | string | - | |
property | string | - | |
rel | string | - | |
resource | string | - | |
rev | string | - | |
typeof | string | - | |
vocab | string | - | |
autoCorrect | string | - | |
autoSave | string | - | |
itemProp | string | - | |
itemScope | boolean | - | |
itemType | string | - | |
itemID | string | - | |
itemRef | string | - | |
results | number | - | |
security | string | - | |
unselectable | "off" | "on" | - | |
popover | "" | "auto" | "manual" | - | |
popoverTargetAction | "hide" | "toggle" | "show" | - | |
popoverTarget | string | - | |
inert | boolean | - | @see https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert |
inputMode | "none" | "text" | "search" | "url" | "tel" | "email" | "numeric" | "decimal" | - | Hints at the type of data that might be entered by the user while editing the element or its contents @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute |
is | string | - | Specify that a standard HTML element should behave like a defined custom built-in element @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is |
form | string | - | |
htmlFor | string | - | |
children | ReactNode | - | |
wrapWith | ReactElement<unknown, string | JSXElementConstructor<any>> | - | |
ref | Ref<HTMLLabelElement> | - | Allows getting a ref to the component instance.
Once the component unmounts, React will set |
key | Key | - |
Verwende ein Label, um ...
Das Label wird z.B. beim TextField, LabeledValue oder Switch verwendet.
Das Label sollte ...