Arrange related actions with consistent spacing and responsive wrapping.
Use Button Group
<jangle-button-group> arranges related actions with consistent spacing and preserves their reading
and keyboard order. Use it for actions such as Save and Cancel. It does not manage selection or
provide toolbar arrow-key navigation.
Add a group
Configure package access, then register the group and its children:
import '@jangle-ui/tokens/tokens.css';
import '@jangle-ui/components/button/register';
import '@jangle-ui/components/button-group/register';<jangle-button-group label="Profile actions" align="end">
<jangle-button treatment="quiet">Cancel</jangle-button>
<jangle-button intent="brand" treatment="strong">Save changes</jangle-button>
</jangle-button-group>Connect the actions to your application as you would standalone Buttons. The group never changes their size, emphasis, disabled state, or form behavior. Prefer matching sizes in an ordinary group. Different sizes are supported when a particular composition needs them.
Priority and attachment edges
Use order="priority" when actions have a deliberate highest-to-lowest priority sequence. Author
children highest priority first; this sequence also remains their reading and native Tab order.
align="end" places the first action at the logical end and the rest inward. align="start"
places it at the logical start and the rest onward. In LTR this means primary on the right for an
end-attached group, and on the left for a start-attached group. RTL mirrors those edges. Centered
and vertical groups retain ordinary source flow; vertical priority starts at the top.
Priority is declared by source order, never inferred from intent, treatment, or label. A destructive
control is not automatically primary. Avoid this mode for steps whose meaning requires ordinary
reading-direction sequencing. The default order="document" preserves the existing visual and
keyboard sequence; existing groups need no migration.
The parent owns the relationship between content and actions. When a whole action group moves below
its associated text, align it to logical start. Each parent component defines its own attachment
rule. Standalone Button Group wraps its own buttons, but cannot infer when a surrounding
page header, row, or other parent has moved it below content. That parent must update align.
Wrapping buttons within an end-attached group alone does not change the attachment edge.
Tab always follows the declared priority, including end-to-inward traversal in an end-attached horizontal group. Changing alignment preserves focus and source nodes. No positive tabindex, keyboard interception, toolbar behavior, or DOM reordering is introduced.
Layout and naming
Horizontal groups wrap when their actions no longer fit the available width. There is no fixed
breakpoint. Use orientation="vertical" for a column. align="start|center|end" follows the
document's direction and aligns each row or the intrinsic-width controls in a column.
An optional localized label provides an accessible group name when the grouping context helps.
An omitted or whitespace-only label leaves an ordinary layout container. Every child still needs
its own accessible name. The group adds no focus stop; Tab visits the children normally.
See Button Group in Storybook for interactive Controls, wrapping, and vertical examples.