You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Version: 1.0 Framework: React + Tailwind CSS Last Updated: 2026-07-23
All components live in novaRewards/frontend/components/ui/. Each component uses Tailwind CSS utility classes and references design tokens from tailwind.config.ts.
Buttons
Variants
Variant
Background
Text
Border
Use When
primary
primary-600
white
none
Main actions, CTAs
secondary
white
primary-600
primary-600
Secondary actions
tertiary
transparent
primary-600
none
De-emphasized actions
danger
error-600
white
none
Destructive actions
ghost
transparent
neutral-600
none
Utility actions, close buttons
success
success-600
white
none
Confirm, complete actions
Sizes
Size
Height
Padding H
Font Size
Min Width
xs
28px
10px
12px
64px
sm
32px
12px
14px
80px
md
40px
16px
14px
96px
lg
48px
20px
16px
112px
xl
56px
24px
18px
128px
Accessibility: All button sizes meet the 44px minimum touch target when accounting for interaction area padding.
// Left icon<Buttonicon={<PlusIcon/>}iconPosition="left">Add Campaign</Button>// Right icon<Buttonicon={<ArrowRightIcon/>}iconPosition="right">Continue</Button>// Icon-only (requires aria-label)<Buttonicon={<XMarkIcon/>}iconOnlyaria-label="Close"/>
Implementation Notes
Use <button type="button"> unless in a form (use type="submit")
Use disabled attribute for form validation disabled states
Use aria-disabled="true" + pointer-events-none for non-form disabled states
Loading state must announce to screen readers: aria-busy="true"
Inputs
Types
Type
Component
Notes
text
<Input type="text">
Default
email
<Input type="email">
Triggers email keyboard on mobile
password
<Input type="password">
Show/hide toggle button
number
<Input type="number">
Numeric keyboard on mobile
date
<Input type="date">
Native date picker
search
<Input type="search">
Search icon left, clear button right
select
<Select>
Custom styled dropdown
textarea
<Textarea>
Resizable, min 3 rows
checkbox
<Checkbox>
Custom styled
radio
<RadioGroup>
Custom styled group
States
State
Border
Ring
Background
Text
Default
neutral-300
none
white
neutral-900
Focus
primary-600
ring-2 ring-primary-600
white
neutral-900
Error
error-500
ring-2 ring-error-500
white
neutral-900
Success
success-500
none
white
neutral-900
Disabled
neutral-200
none
neutral-50
neutral-400
Label Specification
Always top-left of input
Font: 14px / 500 weight (type-label)
Color: neutral-700
Required: red asterisk <span className="text-error-500" aria-hidden="true">*</span>
for attribute matches input id
Helper and Error Text
[Label] *
[Input field]
[Helper text — neutral-500, 12px] OR [Error text — error-600, 12px, error icon]
Helper text: id="[input-id]-hint", referenced by aria-describedby
Error text: id="[input-id]-error", referenced by aria-describedby aria-errormessage
Error announced to screen reader: aria-invalid="true" on input
┌──────────────────────────────────┐
│ [Active Badge] [Menu ⋮] │
│ Campaign Name (H3) │
│ Start: Jan 1 → End: Dec 31 │
│ │
│ Issued: 45,000 / 100,000 NOVA │
│ [Progress bar — 45%] │
│ │
│ [View Details] [Edit] │
└──────────────────────────────────┘
Badges
Variants and Colors
Variant
Background
Text
Border
Use For
success
success-100
success-700
none
Active, completed, verified
warning
warning-100
warning-700
none
Pending, expiring soon
error
error-100
error-700
none
Failed, expired, rejected
info
info-100
info-700
none
Informational status
neutral
neutral-100
neutral-700
none
Inactive, draft
primary
primary-100
primary-700
none
Featured, highlighted
Sizes
Size
Height
Padding H
Font Size
sm
18px
6px
11px
md
22px
8px
12px
Variants
// With dot indicator<Badgevariant="success"dot>Active</Badge>// With icon<Badgevariant="warning"icon={<ClockIcon/>}>Expiring</Badge>// Pill style (default is rounded-full)<Badgevariant="primary">Featured</Badge>
role="dialog", aria-modal="true", aria-labelledby pointing to title
Focus trap: tab cycles within modal only
Close on Escape
Close on backdrop click (optional, configurable)
Return focus to trigger element on close
Scroll body locked while modal is open
Form Patterns
Standard Form Layout
┌──────────────────────────────────────────────────────────┐
│ Form Title (H2) │
│ Subtitle or description │
│ │
│ Full Name * │
│ ┌──────────────────────────────────────────────────┐ │
│ │ │ │
│ └──────────────────────────────────────────────────┘ │
│ Enter your full name as it appears on your ID │
│ │
│ Email Address * │
│ ┌──────────────────────────────────────────────────┐ │
│ │ john@example.com │ │
│ └──────────────────────────────────────────────────┘ │
│ ✗ Please enter a valid email address (error state) │
│ │
│ [Cancel] [Submit →] │
└──────────────────────────────────────────────────────────┘
Spacing Rules
Field top margin: mt-6 (24px) between fields
Label to input: mt-1.5 (6px)
Input to helper text: mt-1 (4px)
Group of fields: space-y-6
Component Checklist
Before shipping any component:
All interactive states designed (default, hover, focus, active, disabled)
Mobile layout verified at 320px minimum width
Dark mode variant implemented
Keyboard accessible (navigable, operable)
Screen reader accessible (ARIA roles/labels)
Meets WCAG AA contrast (4.5:1 text, 3:1 large text + graphics)