Skip to content

Badges

The badges component can be used to display any generic Key/Value data in a more condensed view. Optionally, you can also omit they Key/Value and display only one.

Dynamic Content

Badges block rendering example

Badges support dynamic content using template variables with {{ }} style templates. This allows creating badges with data from the frontmatter or even calculations based off abilities or skills. This is great for things like

  • Level
  • Armor Score
  • Evasion

Using dynamic content helps keep your character sheet updated as you level up.

See the Events (API) page for more information on using templates.

Example

yaml
```badges
items:
  - label: Character
    value: "{{ frontmatter.name }}"
  - label: Class
    value: "{{ frontmatter.class }}"
  - label: Subclass
    value: "{{ frontmatter.subclass }}"
  - label: Heritage
    value: "{{ frontmatter.ancestry }} ({{ frontmatter.heritage }})"
  - label: Level
    value: "{{ frontmatter.level }}"
  - label: Evasion
    value: "{{ frontmatter.evasion }}"
  - label: Spellcast Trait
    value: "{{ frontmatter.spellcast_trait }}"
```

configuration

PropertyTypeDefaultDescription
itemsArrayRequiredList of badge items to display
styleClassStringnoneOptional CSS class name applied to the outer badges container
reverseBooleanfalseWhen true, render value before label instead of label → value

Item

PropertyTypeDescription
labelStringLabel text (optional)
valueString / Number / BoolValue to display (optional)

See also

  • Traits – source of traits.* values you can show in badges.
  • Dynamic Content – full reference for template usage.
  • State Storage – background on how other blocks persist values that badges often display.