ListGroup
The Bootstrap List group
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_list_group(*args, &block)
bs_list_group(*args, &block)
Returns a bootstrap listgroup containing series of content. Also the listgroup is customizable with the following options.
Optional options
:items
- expects an array of hashes withtype
,text
,path
,active
,variant
,badge
as possible keys:variant
- Specify a variant for the button. Variant 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 viaclass
.
active
- If set true list item will have an active classbadge
- If given, renders an additional badgeicon
- Name of desired icon which will prepend the (optionally) given texttype
- Can benil
,link
,transition
,action
,label
ortab
will automatically render the listgroup as a
div
(rather thanul
) when one of the items islink
,transition
,action
ortab
horizontal
- to change the layout of list group items from vertical to horizontal across all breakpoints.horizontal_size
- choosesm
,md
,lg
,xl
,xxl
to make a list group horizontal starting at that breakpoint’s min-widthvariant
- If set to:flush
, borders and rounded corners will be removedHtml attributes - all w3c confirm html attributes for div's can be set via options and will be added to the surrounding listgroup div.
Examples
Example 1: Basic example
Example 2: Basic example with links
Example 3: Basic example with transitions
Example 4: Basic tab nav example
Last updated