Skip to content

Group

Arrange related controls with density and attachment options. CSS only

Group
Copy this markup
<div class="ui-group" data-ui-attached>
<button class="ui-button" data-ui-variant="secondary" type="button">Day</button>
<button class="ui-button" data-ui-variant="secondary" type="button">Week</button>
<button class="ui-button" type="button">Month</button>
</div>

Install

Styles and registration
import '@timelessui/components/css/tokens.css'
import '@timelessui/components/css/button.css'
import '@timelessui/components/css/group.css'

Attributes

Every value below is implemented by the stylesheets this component ships. Boolean attributes are presence-based: author the attribute with no value, or omit it.

AttributeValuesDefaultDescription
data-ui-orientationhorizontal · verticalhorizontalLayout direction of the grouped controls.
data-ui-densitycompact · normal · spaciousnormalGap between grouped controls.
data-ui-wrappresenceabsentPresent to let the group wrap onto multiple lines.
data-ui-attachedpresenceabsentPresent to collapse the gap and join adjacent controls into one segmented control.

Styling

Root identity: ui-group. Required stylesheets: tokens.css, button.css, group.css.

This component adds no custom properties of its own. Restyle it through the design tokens or your own CSS.

Design tokens this component reads (23)

These are global Atmosphere tokens. Change them once at the theme level rather than per component.

--ui-accent · --ui-bg-accent · --ui-bg-accent-active · --ui-bg-accent-hover · --ui-bg-control · --ui-bg-control-active · --ui-bg-control-hover · --ui-bg-control-muted · --ui-bg-danger · --ui-bg-danger-active · --ui-bg-danger-hover · --ui-duration-fast · --ui-ease-standard · --ui-fg · --ui-focus · --ui-radius-control · --ui-shadow-control-accent · --ui-shadow-control-active · --ui-shadow-control-danger · --ui-shadow-outline-control · --ui-space-1 · --ui-space-2 · --ui-space-4

Accessibility

Keep the native elements, roles, and relationships shown in the example. Timeless adds only the state and keyboard coordination the platform does not already provide, and it never supplies your accessible names — those depend on your content.

Before JavaScript runs

This primitive is CSS only. There is nothing to register and nothing to wait for.

More examples

Open Group in StoryLite for variants, controls, and manual testing.