Form Group
Form groups are the easiest way to add structure and spacing to form elements.
Example
The <i-form-group> component is a wrapper that provides proper grouping of labels, input, help text, and form validation messaging. By default, form groups add spacing between them.
Disabled State
Setting a form group as disabled will cause all of its child form components to be disabled.
Sizes
You’re able to use the size modifier to control the size of the form components inside your <i-form-group>, using one of the available sizes: sm, md, and lg. The default size is set to md.
All of the components inside the <i-form-group> will inherit the parent form group’s size.
Form Group Nesting
You can nest form groups in order to control the disabled, readonly and size properties of multiple form components at once. All the child inputs of the parent form group will inherit the property.
Configuration
Props
Use props to modify the component’s design and behavior.
- Property
colorType'light' | 'dark'Default'light'Description The color variant of the form group - Property
disabledTypeBooleanDefaultfalseDescription The disabled state of the form group - Property
inlineTypeBooleanDefaultfalseDescription Display the form group as inline - Property
nameTypeStringDefault''Description The identifier of the form group - Property
readonlyTypeBooleanDefaultfalseDescription The readonly state of the form group - Property
requiredTypeBooleanDefaultfalseDescription The required state of the form group - Property
sizeType'sm' | 'md' | 'lg'Default'md'Description The size variant of the form group
Slots
Use slots to insert custom content into well-defined component locations.
- Property
defaultDescription Slot for default form group content
CSS Variables
Read more about configuring Inkline’s Design System variables to update the look and feel of the component.
- Property
----margin-topValuevar(--margin-top)Description The margin top of the form error component