|
3 | 3 | module Flowbite |
4 | 4 | # Renders a breadcrumb navigation component. |
5 | 5 | # |
6 | | - # See https://flowbite.com/docs/components/breadcrumb/ |
7 | | - # |
8 | | - # Use {Flowbite::Breadcrumb} and the child {Flowbite::Breadcrumb::Item} components to create and indicate a series of page structure and URLs to help the user navigate through the website. |
| 6 | + # Use {Flowbite::Breadcrumb} and the child {Flowbite::Breadcrumb::Item} |
| 7 | + # components to create and indicate a series of page structure and URLs to |
| 8 | + # help the user navigate through the website. |
9 | 9 | # |
10 | 10 | # Breadcrumbs consist of the following components: |
11 | 11 | # |
12 | 12 | # - {Flowbite::Breadcrumb}: Container for breadcrumb items. |
13 | 13 | # - {Flowbite::Breadcrumb::HomeIcon}: Home icon for the first breadcrumb item. |
14 | 14 | # - {Flowbite::Breadcrumb::SeparatorIcon}: Separator between breadcrumb items. |
15 | 15 | # - {Flowbite::Breadcrumb::Item}: An individual breadcrumb item. |
16 | | - # - {Flowbite::Breadcrumb::Item::Current}: An invidual breadcrumb item without a link, usually used for the current page in the breadcrumb trail. |
17 | | - # - {Flowbite::Breadcrumb::Item::First}: An individual breadcrumb item with a home icon on it. |
| 16 | + # - {Flowbite::Breadcrumb::Item::Current}: An individual breadcrumb item |
| 17 | + # without a link, usually used for the current page in the breadcrumb trail. |
| 18 | + # - {Flowbite::Breadcrumb::Item::First}: An individual breadcrumb item with a |
| 19 | + # home icon on it. |
| 20 | + # |
| 21 | + # @example Usage |
| 22 | + # <%= render(Flowbite::Breadcrumb.new) do |breadcrumb| %> |
| 23 | + # <% breadcrumb.with_item do %> |
| 24 | + # <%= render(Flowbite::Breadcrumb::Item::First.new(href: "/")) { "Root page" } %> |
| 25 | + # <% end %> |
| 26 | + # <% breadcrumb.with_item do %> |
| 27 | + # <%= render(Flowbite::Breadcrumb::Item.new(href: "/projects")) { "Parent page" } %> |
| 28 | + # <% end %> |
| 29 | + # <% breadcrumb.with_item do %> |
| 30 | + # <%= render(Flowbite::Breadcrumb::Item::Current.new) { "Current Page" } %> |
| 31 | + # <% end %> |
| 32 | + # <% end %> |
18 | 33 | # |
19 | 34 | # @viewcomponent_slot [Flowbite::Breadcrumb::Item] items The items of the |
20 | 35 | # breadcrumb trail. Use {Flowbite::Breadcrumb::Item::First} for the first |
21 | 36 | # item to get a home icon, and {Flowbite::Breadcrumb::Item::Current} for the |
22 | 37 | # last item to render it without a link. |
23 | 38 | # |
24 | 39 | # @lookbook_embed BreadcrumbPreview |
| 40 | + # @see https://flowbite.com/docs/components/breadcrumb/ |
25 | 41 | class Breadcrumb < ViewComponent::Base |
26 | 42 | renders_many :items |
27 | 43 |
|
|
0 commit comments