Skip to content
On this page

WARNING

While the documentation is fairly complete, it is still in first draft.

FormGroup (BonesFormGroup)

Overview

The Barebones FormGroup component is used exclusively to wrap the FormInput and FormSelect elements.

Component parts

Part nameDescription
componentThe components root element.
labelWrapperThe div that wraps the label.
labelThe label element.
inputWrapperThe div that wraps the input.
inputThe input element.
customInputThe custom input from ``FormInput`
errorWrapperThe div that wraps errors

Props

Prop nameDescription
labelThe label is a string prop and is passed to the FormGroup and used to label the input.
errorThe error is a string prop and is passed to the FormGroup and used to display an error if one exists.
formErrorPropsformErrorProps are props that are passed to FormError if you'd like to override defaults
groupTypegroupType is the input type, passed from FormInput or FormSelect

Component Type

export interface FormInput {
  parts: DynamicParts;
}

Examples

<BonesFormGroup
  label="First name"
  name="first_name"
>
  <input />
</BaseFormGroup>