ButtonGroup¶
-
/libs/granite/ui/components/coral/foundation/form/buttongroup
A container to group a set of buttons. The user is able to select one or more buttons. The selected values are then submitted during form submission.
It extends
Field
component.It has the following content structure:
-
granite:FormButtonGroup
- granite:FormField
- granite:container
- namestring
The name that identifies the field when submitting the form.
-
selectionMode
- none
- none
- single
- multiple
The selection mode.
- none
- Nothing can be selected.
- single
- Only a single item can be selected.
- multiple
- Multiple items can be selected.
-
deleteHintboolean
- true
true
to generate the SlingPostServlet @Delete hidden input based on the name.
- requiredboolean
Indicates if the field is mandatory to be filled.
- validationstring
- multiple
The name of the validator to be applied. E.g.
foundation.jcr.name
. See validation in Granite UI.
- ignoreDataboolean
If
false
, the checked status is based on matching the form values byname
andvalue
properties. Otherwise, the form values are not matched, and the checked status of each item is based on itschecked
property.
Each item has the following content structure:
-
granite:FormButtonGroupItem
- granite:commonAttrs
- valuestring
The value of the item.
- disabledboolean
Indicates if the item is in disabled state.
- checkedboolean
true
to pre-check this item,false
otherwise.
- textstring
- i18n
The text of the item.
- hideTextboolean
Visually hide the text. It is RECOMMENDED that every item has a text for a11y purpose. Use this property to hide it visually, while still making it available for a11y.
- iconstring
The icon name. e.g. “search”.
-
iconSizestring
- S
- XS
- S
- M
- L
The size of the icon.
-
granite:FormButtonGroup