data-display/DSPromoLabel
DSPromoLabel
data-displayPromotional label for discounts, new items, or special badges.
iOSmacOS
Purpose
Use to highlight promotions, discounts, or special features. Eye-catching accent for marketing content.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| textreq | String | โ | Promo text (e.g., '-20%', 'New') |
| color | Color | DSColor.accent | Background color |
Examples
Discount badge
Show discount on product card.
swift
ZStack(alignment: .topTrailing) {
ProductCard(product)
DSPromoLabel(text: "-20%", color: DSColor.error)
.padding(DSSpacing.sm)
}New feature
Highlight new features.
swift
HStack {
Text("Dark Mode")
DSPromoLabel(text: "New", color: DSColor.info)
}Usage Guidelines
- Keep text very short (2-4 characters for discounts)
- Use bright, attention-grabbing colors
- Position in top-right corner of cards or inline with text