An accessible label linked to a form control.
import { Label } from '@vrum/ui';
import { Input } from '@vrum/ui';
<Label
htmlFor={"project-name"}
>
{"Project name"}
</Label>Copy code| Prop | Type | Default | Description |
|---|---|---|---|
htmlFor | string | none | html for configuration. |
defaultChecked | boolean | none | default checked configuration. |
defaultValue | string | number | readonly string[] | none | Initial value for an uncontrolled component. |
autoFocus | boolean | none | auto focus configuration. |
className | string | none | Additional CSS classes. |
id | string | none | id configuration. |
style | CSSProperties | none | Inline style overrides. |
aria-invalid | boolean | "false" | "true" | "grammar" | "spelling" | none | Indicates the entered value does not conform to the format expected by the application. |
aria-label | string | none | Defines a string value that labels the current element. |
children | ReactNode | none | Content displayed inside the component. |
onFocus | FocusEventHandler<HTMLLabelElement> | none | on focus configuration. |
onBlur | FocusEventHandler<HTMLLabelElement> | none | on blur configuration. |
onChange | ChangeEventHandler<HTMLLabelElement, Element> | none | Called when the input value changes. |
onSubmit | SubmitEventHandler<HTMLLabelElement> | none | Called when the form is submitted. |
onKeyDown | KeyboardEventHandler<HTMLLabelElement> | none | on key down configuration. |
onClick | MouseEventHandler<HTMLLabelElement> | none | Called when the control is activated. |
onSelect | ReactEventHandler<HTMLLabelElement> | none | on select configuration. |