Base Components
Label
Labels provide context for user inputs.
Installation
Install the following dependencies:
terminal
Create a label.tsx
file and paste the following code into it.
/components/ui/label.tsx
Update the import paths to match your project setup.
API Reference
Label.Root
This component is based on the Label.Root primitive. Also includes:
Prop | Type | Default |
---|---|---|
disabled | boolean |
Label.Asterisk
Displays an asterisk (*) symbol, typically used to indicate required fields. This component is based on the <span>
element and supports all of its props.
Label.Sub
Used to display supplementary text associated with the label, such as instructions or additional information. This component is based on the <span>
element and supports all of its props.
© 2024 AlignUI Design System. All rights reserved.