Reference Source
import Badge from 'flarum/components/Badge.js'
public class | source

Badge

Extends:

flarum/Component~Component → Badge

The Badge component represents a user/discussion badge, indicating some status (e.g. a discussion is stickied, a user is an admin).

A badge may have the following special props:

  • type The type of badge this is. This will be used to give the badge a class name of Badge--{type}.
  • icon The name of an icon to show inside the badge.
  • label

All other props will be assigned as attributes on the badge element.

Method Summary

Public Methods
public

config(isInitialized: *)

public

view(): *

Public Methods

public config(isInitialized: *) source

Params:

NameTypeAttributeDescription
isInitialized *

public view(): * source

Return:

*