Components
SmilesBalance
The Smiles loyalty card — the points total, the member's tier and the progress towards the next tier.
Figma description ·
smiles-balance-cardOpen in Figma ↗This component has no description in Figma yet.
Props
import SwiftUI import EandTokens // smiles-balance-card: white (surface/base/inverse), full width × 148 (row-2), r16. // Header 16/16/0: the 28pt total (heading/lg variables) over "Points" (24pt style) with // a 20pt info button, and a 40pt tier pill. Footer 8/16/0, bottom-aligned, gap 4: a 12pt // pill progress bar (sunken-inverse track, positive fill) and the next-tier line. struct SmilesBalance: View { let points: String; let progress: Double // 0…1 var body: some View { VStack(alignment: .leading, spacing: 0) { HStack(alignment: .top) { VStack(alignment: .leading, spacing: 0) { Text(points).font(.system(size: EandTypography.headingXl.size, weight: .bold)) // 28pt HStack(spacing: EandSpacing.xs) { Text("Points") .font(.system(size: EandTypography.headingLg.size, weight: EandTypography.headingLg.weight)) Image(systemName: "info.circle.fill").font(.system(size: EandIcon.md)) .frame(width: EandIcon.lg, height: EandIcon.lg) } } Spacer() TierPill(tier: .silver) // 40pt pill, 32pt medal; legacy fill #f4f3f5 (no token) } .padding([.top, .horizontal], EandSpacing.lg) Spacer(minLength: EandSpacing.sm) VStack(alignment: .leading, spacing: EandSpacing.xs) { GeometryReader { geo in ZStack(alignment: .leading) { Capsule().fill(EandColor.surfaceSunkenInverse) Capsule().fill(EandColor.textPositiveSubtle).frame(width: geo.size.width * progress) } } .frame(height: EandScale.scale12) Text("Just 2,500 points to your Gold Tier").font(.system(size: EandTypography.bodyMd.size)) } .padding(.horizontal, EandSpacing.lg) } .foregroundColor(EandColor.textDefaultDefault) .frame(maxWidth: .infinity).frame(height: EandSection.bodyHeightRow2) .background(EandColor.surfaceBaseInverse) .clipShape(RoundedRectangle(cornerRadius: EandRadius.radius6)) } }
When to use
- Use at the top of the Smiles area or the account hub, to show the member's balance and how close they are to the next tier.
- Don't use to list partner brands (use LogoRow with Smiles partner logos) or for plan allowances (use PlanUsageBar).
Anatomy
- Total —
pointsin bold 28px, over thelabel("Points") in bold 24px. - Info —
tooltip(on by default) adds an info button after the label;onInfohandles it. - Tier pill — the current
tier(silver,goldorplatinum) with its medal.nullhides it. - Footer — a progress bar (
progress, 0 to 100) over a line that namespointsToNextand thenextTier.messagereplaces the line.
active={false} is the not-yet-activated state: no tier pill, and the line invites the member
to activate, with pointsToNext as the reward.
<SmilesBalance points="40,340" tier="silver" nextTier="gold" pointsToNext="2,500" progress={40} onInfo={explain} />
<SmilesBalance active={false} points="0" pointsToNext="500" />Deprecated
cta belongs to the V1.0 gold strip's Redeem button, which V1.2 removes. It renders only when
set.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
active? | boolean | true | Figma states: points-activated (default) | points-not-active. |
cta? | ReactNode | — | Deprecated. V1.0 gold strip's Redeem button — absent in V1.2. Renders only when set. |
label? | ReactNode | Points | The unit line under the total. |
message? | ReactNode | — | Replaces the footer line. |
nextTier? | 'silver' | 'gold' | 'platinum' | gold | The tier the footer line points to. |
onInfo? | (() => void) | — | |
points? | ReactNode | 40,340 | Figma points-total-string. |
pointsToNext? | ReactNode | 2,500 | Figma points-left-string. |
progress? | number | 5 | Progress towards the next tier, 0–100. |
tier? | SmilesTier | null | silver | The member's current tier (pill, activated only). null hides the pill. |
tooltip? | boolean | true | Figma tooltip — the info icon beside "Points". |
Design
Figma source: smiles-balance-card — etisalat Consumer App DSL V1.2
- Full width × 148px (
row-2), 16px radius (border-radius/6), onsurface/base/inverse. - Header padding 16/16/0 (
spacing/lg). The total binds thetypography/heading/lgvariables (28px, 120%); "Points" applies theheading/lgtext style (24px, 110%). - Tier pill: 40px tall, a 32px medal and the tier name.
- Progress bar: 12px tall, a
surface/sunken/inversetrack and atext/positive/subtlefill. - Several bindings are legacy styles with no V1.2 token (the ink, the pill fill and the tier gradients), so they are literals. Only the Silver medal exists in Figma; Gold and Platinum reuse their tier gradient.