Skip to content

Latest commit

 

History

History
57 lines (46 loc) · 1.4 KB

File metadata and controls

57 lines (46 loc) · 1.4 KB

Badge

Easily highlight new or unread items by adding a badge component to them. They can be best utilized with a numerical text, but any string will do fine.

Note that as of Bootstrap4 this also implements your label component.

Example usage

{{#bootstrap_badge: text | .. }}

Allowed Attributes

The following attributes can be used inside the parser function:

class
Adds this string to the class attribute of the component. If you want to add multiple classes, separate them by a space.
color
Sets the color for this component. See bootstrap's [color documentation](https://getbootstrap.com/docs/4.1/utilities/colors/) for more information.

Allowed Values are

  • default
  • primary
  • secondary
  • success
  • danger
  • warning
  • info
  • light
  • dark
  • white
id
Sets the id of the component to this value. See to it, that it is unique.
pill
Makes the badges more round.

You can also set this attribute to any no value, in which case it is ignored.

style
Adds this string to the style attribute of the component. If you want to add multiple css styles, separate them by a semicolon.

Links