Compact segmented control (All · Active · Backlog). Not tabs — there is no panel. Arrow keys move and activate the next segment.
<.segmented id="scope" value={@scope} aria-label="View">
<:segment value="all" patch={~p"/tickets"}>All</:segment>
<:segment value="active" patch={~p"/tickets?scope=active"}>Active</:segment>
<:segment value="backlog" phx-click="set_scope" phx-value="backlog">Backlog</:segment>
</.segmented>
Summary
Functions
Attributes
id(:string) (required) - Stable id for theLanternSegmentedhook.value(:any) - Value of the active segment (atom or string). Defaults tonil.size(:string) - Control density. Defaults to"sm". Must be one of"sm", or"md".label(:string) - Accessible name of the group (aria-label). Prefer this over a visual legend. Defaults tonil.class(:any) - Extra classes merged onto the group. Defaults tonil.- Global attributes are accepted. Arbitrary HTML/
phx-*attributes passed through.
Slots
segment(required) - One segment; link via patch/navigate/href or button via phx-click. Accepts attributes:value(:any) (required)patch(:string)navigate(:string)href(:any)disabled(:boolean)class(:any)phx-click(:string)phx-value(:string)phx-target(:any)