Installation
Add Component
Copy the code snippet below into you components folder.
Integrate Recipe
Integrate this recipe in to your Panda config.
Usage
Examples
Invalid
Pass the invalid prop to Field.Root and use the Field.ErrorText to indicate that the field is invalid.
HelperText
Use the Field.HelperText to add helper text to the field.
Required
Pass the required prop to Field.Root and use the Field.RequiredIndicator to indicate that the field is required.
Closed Component
Here's how to setup the field for a closed component composition.
Props
Root
| Prop | Default | Type | 
|---|---|---|
| asChild | booleanUse the provided child element as the default rendered element, combining their props and behavior. | |
| disabled | booleanIndicates whether the field is disabled. | |
| ids | ElementIdsThe ids of the field parts. | |
| invalid | booleanIndicates whether the field is invalid. | |
| readOnly | booleanIndicates whether the field is read-only. | |
| required | booleanIndicates whether the field is required. | 
RequiredIndicator
| Prop | Default | Type | 
|---|---|---|
| asChild | booleanUse the provided child element as the default rendered element, combining their props and behavior. | |
| fallback | string | number | bigint | boolean | ReactElement<unknown, string | JSXElementConstructor<any>> | Iterable<ReactNode> | ReactPortal | Promise<...> | 
Textarea
| Prop | Default | Type | 
|---|---|---|
| autoresize | false | booleanWhether the textarea should autoresize | 
| asChild | booleanUse the provided child element as the default rendered element, combining their props and behavior. |