FlowbitePhoenix.Components.Navigation (FlowbitePhoenix v0.1.2)

View Source

Navigation components for FlowbitePhoenix using Flowbite CSS framework.

This module provides navigation-related components including dropdowns, back links, and other navigation elements with consistent Flowbite styling.

Summary

Functions

Renders a back navigation link.

Renders a breadcrumb navigation component.

Renders a dropdown component using Flowbite styling.

Renders a pagination component.

Functions

back(assigns)

Renders a back navigation link.

Examples

<.back navigate={~p"/posts"}>Back to posts</.back>

Attributes

  • navigate (:any) (required)

Slots

  • inner_block (required)

pagination(assigns)

Renders a pagination component.

Examples

<.pagination 
  current_page={@current_page} 
  total_pages={@total_pages}
  path_fn={fn page -> "/posts?page=" <> to_string(page) end}
/>

Attributes

  • current_page (:integer) (required)
  • total_pages (:integer) (required)
  • path_fn (:any) (required) - Function that takes a page number and returns a path.
  • class (:string) - Defaults to "".