Soracom

Design System
  1. Home
  2. Design system
  3. Elements
  4. Select

Select

Options

There are two basic html structures for using ds-select. The most basic implementation is to apply ds-select directly to the html select element.

As of v1.13 ds-select can be applied to a wrapper div which provides better icon support and improved layout when combined with ds-text--addon.

Basic usage

Select element

html
Copy

Div element

html
Copy

Disabled

Select element disabled state

html
Copy

Div element disabled state

html
Copy

Hide label

Available from v1.5.54+

Adding ds-select --hide-label to a ds-select with an icon will hide the text value and shorten the button to display only the icon.

html
Copy

Component colors

html
Copy

Visual states

Select adheres to the 4x preset visual states - alert, warning, success and info.

Select element with visual state

html
Copy

Select element with visual state

html
Copy

Icons

To apply icons to ds-select, you must use the div based html structure.

html
Copy

Size

Available from v1.6.55+

Small, large

Small size

html
Copy

Large size

html
Copy

Narrow, mid, wide

By default ds-select takes the full width of it’s container element.

Narrow size

html
Copy

Mid size

html
Copy

Wide size

html
Copy

Button addon inside select

ds-button can be used inside ds-select. See ds-button for further examples.

html
Copy

Text addon inside select

ds-text can be used inside ds-select. See ds-text for further examples.

html
Copy

Styles

Custom styles exist for specific use cases.

Button style

Available from v1.5.54+

In situations where the select element is grouped adjacent to buttons in a button bar, it may be appropriate to style the select element as a button using ds-select --button-default. Currently only the default button style is supported.

html
Copy

Examples

html
Copy

Language select menu

html
Copy