Actions.button_group
Server-rendered
Renders a horizontal or vertical button group.
Primary and secondary actions
<.button_group>
<.button>Deploy</.button>
<.button variant={:outline}>Rollback</.button>
</.button_group>
Compact table row controls
<.button_group>
<.button size={:sm} variant={:secondary}>Edit</.button>
<.button size={:sm} variant={:outline}>Duplicate</.button>
<.button size={:sm} variant={:destructive}>Archive</.button>
</.button_group>
Vertical stack for mobile sheets
<.button_group orientation={:vertical} class="w-full">
<.button class="w-full">Save draft</.button>
<.button class="w-full" variant={:outline}>Discard</.button>
</.button_group>
Wizard navigation
<.button_group>
<.button size={:sm}>Back</.button>
<.button size={:sm}>Next</.button>
</.button_group>
Attributes
| Name | Type | Default | Values | Global Includes |
|---|---|---|---|---|
class
|
:string |
— | — | — |
orientation
|
:atom |
:horizontal
|
:horizontal
,
:vertical
|
— |
rest
|
:global |
— | — | — |
Slots
| Slot | Slot Attributes |
|---|---|
inner_block
Required
|
— |