LanternUI.Components.Segmented (LanternUI v0.8.2)

Copy Markdown View Source

Deprecated alias of LanternUI.Components.Tabs.tabs_list/1 with variant="segmented". Removed in 0.9.0.

<.tabs_list id="scope" variant="segmented" size="sm" active_tab={@scope} aria-label="View">
  <:tab name="all" patch={~p"/tickets"}>All</:tab>
  <:tab name="active" patch={~p"/tickets?scope=active"}>Active</:tab>
</.tabs_list>

Summary

Functions

segmented(assigns)

This function is deprecated. Use tabs_list/1 with variant="segmented". Removed in 0.9.0..

Attributes

  • id (:string) (required) - Stable id for the LanternSegmented hook.
  • value (:any) - Value of the active segment (atom or string). Defaults to nil.
  • 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 to nil.
  • class (:any) - Extra classes merged onto the group. Defaults to nil.
  • 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)