Jump to content
Toggle menu
  • 12,3 E szócikkek
  • 21,5 E fájlok
  • 4 felhasználók
  • 63,9 E szerkesztések
SCWIKI
Toggle preferences menu
Toggle personal menu
Nem vagy bejelentkezve
Your IP address will be publicly visible if you make any edits.

Renders an inline badge — a small pill-shaped label suited for status tags, version markers, faction labels, or any short metadata that should read as a distinct chip rather than plain text. Wraps Module:BadgeLua; see the module page for rendering details.

Usage

The first positional argument is the badge text. variant themes the badge via Citizen design tokens; color/bg override those tokens with literal CSS values; icon adds a 16px image before the text.

Wikitext Result
{{Badge|Aurora}} Aurora
{{Badge|Genesis|variant=warning}} Genesis
{{Badge|Caterpillar|variant=error}} Caterpillar
{{Badge|Carrack|variant=success}} Carrack
{{Badge|30K|icon=CdxIconError.svg|bg=#2a6df4|color=#fff}} 30K

Parameters

Renders an inline badge — a small pill-shaped label suited for status tags, version markers, faction labels, or any short metadata that should read as a distinct chip rather than plain text. Wraps Module:BadgeLua; see the module page for rendering details.

Sablonparaméterek

Ennek a sablonnak ajánlott egy sorba írni a paramétereit.

ParaméterLeírásTípusÁllapot
Text1

Badge label. Wikitext is allowed.

Példa
New
Karakterlánckötelező
Variantvariant

Semantic preset that themes the badge via Citizen design tokens. One of `error`, `success`, `warning`. Unknown values are ignored.

Példa
warning
Karakterláncnem kötelező
Iconicon

File name (without the `File:` prefix) of an icon rendered before the text at 16px.

Példa
Sparkle.svg
Fájlnem kötelező
Text colorcolor

CSS color applied to the badge text. Overrides `variant`.

Példa
#fff
Karakterláncnem kötelező
Background colorbg

CSS background color applied to the badge. Overrides `variant`. Alias: `backgroundColor`.

Példa
#2a6df4
Karakterláncnem kötelező
CSS classclass

Extra class appended to the badge root.

Példa
my-badge
Karakterláncnem kötelező

Behavior

  • variant and the raw color/bg props are independent axes. Setting both is allowed — the inline color overrides the variant's text/background color but the variant's border color is kept unless the caller adds their own.
  • Unknown variant values are silently ignored (the badge falls back to the default surface color), so a typo never produces a broken-looking class like t-badge--warnng.
  • The icon image is rendered with class=metadata|link= so it's excluded from MultimediaViewer and is not clickable — the badge reads as inert decoration.

See also