Soracom

Design System
  1. Home
  2. Design system
  3. Containers
  4. Group

Group

A visual container grouping a set of elements. Can be used with fieldset/legend.

Options

Basic usage

Basic usage with html <div> element

html
Copy

Basic usage with html <fieldset> element

html
Copy

Default

By default the header is set to ds-heading --small-bold

Title with html <header> element

html
Copy

Title with html <fieldset> element

html
Copy

Sizes

You can change the header size by using ds-heading classes:

Large title

html
Copy

Xsmall title

html
Copy

Visual states

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

html
Copy
html
Copy

Component color

Color support with html <div> element

html
Copy

Color support with html <fieldset> element

html
Copy

Notification indicator

A group can display a notification indicator (dot) by adding the class ds-group--notification.

Notification indicators support with html <div> element

html
Copy

Notification indicators adhere to 4x preset visual states - alert, warning, success and info.

Notification indicators visual states with html <div> element

html
Copy

Additionally, if the group has an attribute data-notification-counter set to a non-empty value, that value will be shown in the indicator. If the attribute is set to empty data-notification-counter="" the indicator dot will be hidden.

Notification indicators counter support with html <fieldset> element

html
Copy

Flow down

Flow down style with html <div> element

html
Copy

Flow down style with html <fieldset> element

html
Copy

Flow down with component color example

html
Copy

Loading state

A group can be triggered to display a loading state - where the group contents are hidden, and the replaced by a centered spinning loading icon – without affecting the dimensions of the group.

Additional options are available using Message state

Default

html
Copy

Alternative loading-refresh icon

html
Copy

Custom icon by adding any icon class

html
Copy

Message state

Message state extends and can be used with Loading state. If a group has a data-attribute data-ds-message the group contents are hidden, and replaced by an icon and the text of the data-ds-message.

html
Copy

Loading state with a message

html
Copy

You can set a custom icon

html
Copy

You can set a custom icon, with the loading state animation

html
Copy

Examples

Usage with ds-notice

If a ds-notice is the last element inside a group, it will be automatically outdented and presented as a footer.

Using a notice inside a ds-group html <div> element

html
Copy

Using a notice inside a ds-group html <fieldset> element

html
Copy

Usage with ds-banner and ds-details

html
Copy