Select
Open in Storybook Open in Figma
Text-only selects are implemented using bootstrap Selects. Regular <select>
s are not supported.
HINT Selects do not have separator lines by default and .g-dropdown
’s .g-dropdown-separator
modifier takes care of that.
HINT To disable a Select, add .disabled
to the .dropdown
and the .dropdown-toggle
.
Rules For Designers
- In Select cells, padding is 10px.
- In Select cells, the separator is 1px
$color-gray-100 (#eef0f4)
.
FilteredSelect
FilteredSelect lets user to filter the items by typing into the input in the toggle.
ProductSelect
The ProductSelect is used to choose between various accounts, cards, or credit cards.
ProductSelect can either be single or multiselect - the latter with an optional control to select all products at once.
ProductSelect contains title, IBAN/card number, amount, product colour, product image and product type.
Simple ProductSelect
Simple ProductSelect may be used when some information (such as account colours, account images or account types) is not available (e.g. in the George Store).
HINT A full ProductSelect is favoured over the simple variant.
RecipientSelect
RecipientSelect contains title, IBAN, and an amount for each account. Bankcard RecipientSelects omits the amount and the IBAN is actually the card number.
Rules For Designers
- All regular dropdown rules apply.
- In dropdown cells, the amount colour can be
$color-blue-400 (#0a285c)
,$color-ui-red (#cf2a1e)
or$color-ui-green (#07a721)
. - In dropdown cells, amounts can be omitted in case there are no values to display (e.g. for bank cards).
- Split IBANs and other numbers into groups of 4.
Selectable REACT-ONLY
Selectable is used to create a group of complex checkboxes or radio buttons. Wrap each option into a SelectableItem and put them into a Selectable.
Native Selects DEPRECATED
Older implementations of Selects were not able to handle keyboard navigation, which is why we provided the following alternative that looks GDS-compliant.
DEPRECATED Said inability to handle keyboard navigation is no longer the case, hence the deprecation.
Rules For Designers
- Styling is effectively the same as in Selects
Rules For Developers
- If you need a placeholder, add an option with
disabled hidden selected
and avalue
of""
. - You can disable a Native Select by applying
.disabled
to the container and thedisabled
attribute on the control.