Form Group
A versatile wrapper for various form components such as `Input`, `Textarea`, `Select`, and more. It offers a comprehensive set of features, including label, description, hint, message, status, and others.
This component is deprecated and will be removed in the next major release. Use the form component instead.
Examples
Basic
Prop | Default | Type | Description |
---|---|---|---|
label | - | string | Adds a label to the form group. |
id | - | string | Sets the form group's id. |
for | - | string | Sets the label's for attribute. |
Clicking the label focuses the input. We automatically add for
to the label and id
to the input. Override this by defining for
and id
manually.
Required
Prop | Default | Type | Description |
---|---|---|---|
required | false | boolean | Adds * to the label. |
Description
Prop | Default | Type | Description |
---|---|---|---|
description | - | string | Adds a description to the form group. |
Hint
Prop | Default | Type | Description |
---|---|---|---|
hint | - | string | Adds a hint to the form group. |
Message
Prop | Default | Type | Description |
---|---|---|---|
message | - | string | Sets the form group's message. |
We'll never share your email with anyone else.
Status
Prop | Default | Type | Description |
---|---|---|---|
status | - | info ,success , warning , error , undefined | Sets the form group's status. |
Notice that when you change the status
prop, the message
prop and the child component status
prop are automatically updated.
Your username is available.
This information will be visible to other users.
Your email is invalid
Your password is weak.
Counter
Prop | Default | Type | Description |
---|---|---|---|
counter | - | object | Enables the form group's counter. |
Counter | Default | Type | Description |
---|---|---|---|
value | - | string | Sets the counter value. |
max | - | number | Sets the maximum counter number. |
Username has no length limit
Slots
Name | Props | Description |
---|---|---|
default | - | The default slot of the form group, refer Basic section. |
top | - | The top section of the form group. |
bottom | - | The bottom section of the form group. |
label | - | The label slot of the form group. |
description | - | The description slot of the form group. |
hint | - | The hint slot of the form group. |
message | - | The message slot of the form group. |
counter | - | The counter slot of the form group. |