Primitive

Badge

Auto-emitted from DSKintsugiCatalog.badge. Tier atom.

Live Preview
.neutral · hairline border, transparent bg Draft
.info · navy authority surface New
.success · gold-warm confirmation Active
.warning · gold-pale caution Beta
.error · carmine alert Deprecated
.success + prefix icon ● Live
.error + count: 12 12
Native · macOS
macOS SwiftUI render of Badge
DSL usage
// Maps directly to ViewNode.badge(text:style:)

// Neutral — hairline border, no fill
katagami.badge(text: "Draft", style: .neutral)

// Info — navy authority
katagami.badge(text: "New", style: .info)

// Success — gold-warm confirmation
katagami.badge(text: "Active", style: .success)

// Warning — gold caution
katagami.badge(text: "Beta", style: .warning)

// Error — carmine alert
katagami.badge(text: "Deprecated", style: .error)

// With optional prefix icon
katagami.badge(text: "Live", style: .success, prefix: .circle)

// Numeric badge (e.g. notification count)
katagami.badge(text: "", style: .error, count: 12)
Attributes
NameTypeDefaultDescription
text String "" Label text shown inside the badge; ignored when count is set
style BadgeStyle .neutral .neutral | .info | .success | .warning | .error — controls palette
prefix Icon? nil Optional leading icon placed before the text label
count Int? nil Numeric count for notification-style badges; renders the number instead of text
density Density regular compact | regular | expanded
locale Locale en BCP-47 locale tag for locale-aware rendering
Used in
sigma-analytics c-tech KatagamiScreens