Docs

Cinder UI

Advanced.sidebar_item

Server-rendered

Sidebar navigation item.

Use this inside sidebar_group/1 for app routes, navigation rows, and nested secondary items.

Sidebar item

  <.sidebar_group label="Navigation">
  <.sidebar_item icon="home" current={true}>Overview</.sidebar_item>
  <.sidebar_item icon="inbox">Inbox</.sidebar_item>
</.sidebar_group>

Collapsible nested items

  <.sidebar_group label="Workspace">
  <.sidebar_item icon="folder-kanban" collapsible={true} default_open={true}>
    Docs
    <:children>
      <.sidebar_item>Getting started</.sidebar_item>
      <.sidebar_item>Components</.sidebar_item>
    </:children>
  </.sidebar_item>
  <.sidebar_item icon="ship-wheel" href="#deployments" badge="3">
    Deployments
  </.sidebar_item>
</.sidebar_group>

Attributes

Name Type Default Values Global Includes
badge :string — — —
class :string — — —
collapsible :boolean false — —
csrf_token :string — — —
current :boolean false — —
default_open :boolean false — —
disabled :boolean false — —
href :string — — —
icon :string — — —
method :string — — —
navigate :string — — —
patch :string — — —
replace :boolean false — —
rest :global — — —

Slots

Slot Slot Attributes
children —
inner_block Required —
trailing —