A control to pick one of a few options that change the view at once (list or board, week or month): a pill with
a segment per option. It is a group of toggle buttons with aria-pressed; the caller keeps the value and
learns of a choice through event (phx-value-value). A segment can have an icon, a count, or only an icon
(the label is then read by assistive technology). full stretches it to the width of its box.
Summary
Functions
Attributes
id(:string) (required)label(:string) (required) - what the control chooses, for assistive technology.value(:string) (required) - the value of the chosen option.event(:string) (required) - the event sent withvaluewhen an option is pressed.size(:atom) - Defaults to:md. Must be one of:sm, or:md.full(:boolean) - Defaults tofalse.class(:any) - Defaults tonil.target(:any) - aphx-target(a@myself) when used inside a LiveComponent. Defaults tonil.- Global attributes are accepted.
Slots
option(required) - Accepts attributes:value(:string) (required)label(:string) (required)count(:any)icon_only(:boolean)
icon- the icon of an option; gets%{value: option value}.