navbar
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_navbar(*args, &block)
slots
configuration params:items
- Expects an array of Hashes. Each hash object should contain at least these keys: type
, path
, text
.type
: can be either :transition
, :link
or action
.:transition
.path
& text
: expect a stringicon
: name of icon which should prepend the optinally given text:items_class
- You can add here additional class for navbar-nav listme-auto mb-2 mb-lg-0
:brand
- expect hash or string. Possible keys for hash: text
, path
, img
and type
.type
is transition
, you can specify to use a link
instead using the type
:toggle
- expect hash or a symbol (:left
or :right
). This parameter determines whether the expand navigation toggle button should be on the left or rightposition
, class
. With class
you can pass on additional class for toggle button:theme
& :color
- Specify a theme for navbar. Theme represent bootstraps contextual classes and can have one of the following values: :primary, :secondary, :success, :info, :warning, :info, :light, :dark
or your custom contextual class. Point of attention: If color parameter is not set, the color will be the same as theme:fixed_top
, :fixed_bottom
, :sticky_top
- Expects true
. By setting this parameter to true
the related functionality will be activated. If not set, it will simple keep deactivated and you don't have to do anything in addition:expand_at
- set at which screen size the navbar should be expanded:xs, :sm, :md, :lg, :xl, :xxl
.:lg
:container_size
- The container inside the navbar is set as :fluid
by default and can be set with any bootstrap breakpointsslots
- Expects a Hash with the key custom_items
This option allows for more customization. Point of attention: All the options/parameters for toggle
, brand
and items
will be invaled by using this slots optionssticky-top
option. fixed-botton
and sticky-top
can be added in similar way.