Label
The Label component is a standardized form element used to associate descriptive text with controls such as checkboxes and toggles. This component ensures accessibility and consistent styling for Malaysian government websites.
Usage
Examples
Size
Use the size prop to change the label size!
Enable 2FA security?
Enable 2FA security?
Using as Slot
Use the asChild prop to render the label using the Slot component!
Custom Rendered Label
Props
LabelProps
| Prop | Type | Default |
|---|---|---|
asChild | boolean | false |
size | enum | medium |
className | string | - |