Mission card
● Stable · v0.1A single coaching task the user can act on — "Record your first sale", "Count cash 5 days in a row". A mission gives a first-time user one concrete next step with a visible reason to do it, and shows progress so effort feels like it's adding up.
In context
Purpose
MissionCard turns "learn the app" into small, doable steps. One mission = one job, like a screen: an icon, a title, a why-line, optional progress, and one action. It's how DayTwo coaches a new shop owner forward without a trainer in the room.
Anatomy
- Icon disc — a soft teal circle with the mission's glyph.
- Title + why-line — the task and the reason it matters.
- Status pill (optional) — reuses StatusLabel ("New", "Done").
- Progress (optional) — a teal track + a caption ("2 of 5 days").
- Action — one primary button;
onPresscan make the whole card tappable.
Variants
- Call-to-action — a "New" mission with an action button.
- In progress — a progress track + label, still actionable.
- Done — a
successstatus + full track; the reward of finishing.
Code
import { MissionCard } from '@daytwo/components'<MissionCardicon={<Wallet size={22} color={colors.brand.primary} />}title="Count cash 5 days in a row"description="Build the habit that makes your numbers trustworthy."progress={0.4}progressLabel="2 of 5 days"actionLabel="Count today"onAction={countToday}/>
When to use
- Onboarding / activation — the next concrete step for a new user.
- Habit building — a recurring task with visible progress.
When NOT to use
- Advice grounded in numbers (not a task) — use a CoachMessage.
- A plain list row — use a Card or list item.
- Two competing CTAs — a mission has one next step, not a fork.
Good vs bad
- Good: "Record your first sale — log one sale so DayTwo can start tracking your money. [Record now]". One job, one reason, one action.
- Bad: a mission with "Record now" and "Learn more" as equal buttons plus three sub-tasks — it stops being one clear next step and a first-time user stalls on which thing to tap.
Edge cases
Long Burmese/Thai title
Title/why-line wrap; card grows
WhyMY/TH expand — the card must not clip the task
Progress at 0 or 100%
Track clamps 0–1; full = complete
WhyEdge values must render cleanly, not overflow
No action (done)
Omit actionLabel; show a success status
WhyA finished mission is a reward, not a button
Dark mode
Surface, disc, and track follow the theme
WhyThe card must read in both schemes
One mission, one next step
A mission with two equal actions isn't a mission — it's a menu. Keep a single primary action so the next step is never ambiguous.
Tokens used
color.surface.primarycolor.brand.tintcolor.brand.primarycolor.background.tertiarycolor.text.primaryradius.lgelevation.smtypography.headline