pencere

Components / Controls

u:badge

A badge: a count, a state in a word.

A badge: a count, a state in a word. A badge: a count, a state in a word.

The code

return pencere.div():row():items_center():gap(8)
	:child(u:badge(12, { tone = "info", round = true }))
	:child(u:badge("draft"))
	:child(u:badge("saved", { tone = "ok" }))
	:child(u:badge("behind", { tone = "warn" }))
	:child(u:badge("conflict", { tone = "bad" }))

What it does

A badge: a count, a state in a word. props.tone colours it ("info", "ok", "warn", "bad", "quiet" or a role); props.round makes it a pill. It answers nothing and is named by nothing.

kit/sandbox/library/ui/basic.luau, line 261