Breadcrumb
The Bootstrap breadcrumb
component, implemented in Ruby. Use it like any other matestack component in your apps, pages and components. It offers customizable options to simply achieve what is possible in bootstrap with this component. See below for more information about the possible options.
bs_breadcrumb(*args, &block)
bs_breadcrumb(*args, &block)
Returns a bootstrap breadcrumb containing content created from an array of items
and/or content specified by a block. The breadcrumb is customizable with the following options.
Optional options
:items
- Expects an array of hashes. Each hash represents an item and is required to contain at least:path
and:text
keys. The items will be rendered as transitions with all attributes from the hash injected into the transition component. In case you want links instead of transitions add atype: :link
to the item which should be rendered as link. If items are given and a block the items are rendered before the block.:nav_class
- Expects a string. Use:nav_class
to add custom classes to the sourrounding "nav".&block
- Use a block to create custom content/markup inside a breadcrumb. If used together with:text
the text will be displayed before the block.Html attributes - all w3c confirm html attributes for ol's can be set via options and will be added to the items and block surrounding breadcrumb ol element which is in bootstrap surrounded by a nav.
Examples
Simple breadcrumb with transitions
Result:
Breadcrumb with one transition and one link
Result:
Last updated