Form control buttons
Form control buttons provide semantic button elements that look like form inputs. They are designed for scenarios where you need interactive buttons within form layouts while maintaining form control styling consistently.
EuiFormControlButton
EuiFormControlButton renders a button that looks like a form input field. It can be used to trigger actions (e.g. opening popovers) from within a EuiFormControlLayout to ensure expected visual output and consistency with input controls.
EuiFormControlButton is meant to only be used inside EuiFormControlLayout.
The component provides a mix of base EuiButtonEmpty props and input specific props - e.g. use value and placeholder to provide content similar to an input element. You can customize the content by passing additional content via the children prop.
Dropdown styling
Set isDropdown on EuiFormControlLayout to indicate a dropdown toggle that accounts for other form layout icons.
Props
EuiFormControlButton
Prop | Description and type | Default value |
|---|---|---|
Prop placeholder# | Description and type Placeholder value to be shown when no string | Default value |
Prop compressed# | Description and type When boolean | Default value |
Prop isInvalid# | Description and type Defines invalid state styling boolean | Default value false |
Prop fullWidth# | Description and type Expand to fill 100% of the parent. boolean | Default value true |
Prop target# | Description and type Type: string | Default value |
Prop rel# | Description and type Type: string | Default value |
Prop className# | Description and type Type: string | Default value |
Prop isDisabled# | Description and type Type: boolean | Default value |
Prop hasAriaDisabled# | Description and type NOTE: Beta feature, may be changed or removed in the future Changes the native Use e.g. when a disabled button should have a tooltip. boolean | Default value |
Prop css# | Description and type Type: Interpolation<Theme> | Default value |
Prop iconType# | Description and type Any IconType | Default value |