.btn--primary Button System
The unified button system for BrightAI — every button on the production
site resolves to .btn + a variant + a size + a state. All
variants share the same base (44px height, 350ms transition, 2px
focus ring offset 2px). Tap targets ≥ 44px on every size to meet
WCAG 2.5.5 AAA. Page is fully indexable (REPORTS-SEO-FOUNDATION).
نظام الأزرار الموحّد في BrightAI. كل زر على الموقع يستخدم
.btn كنقطة بداية مع variant واحد من القائمة تحت.
أحجام: sm 36px، md 44px (الافتراضي)، lg 52px، xl 60px.
الـ focus ring موحّد: 2px brand color مع offset 2px.
Base button
The foundation: .btn alone gives you a neutral, accessible
button with no variant color. Rarely used directly — start with a
variant below.
Button variants
Six semantic variants plus the legacy .btn--glow.
Each variant defines background, text color, and border —
never override these manually.
.btn--secondary إجراء ثانوي .btn--ghost إجراء خفيف .btn--outline حد فقط .btn--whatsapp تواصل واتساب .btn--danger إجراء مدمر .btn--glow legacy — gradient + glow .btn--accent success / confirm Size ladder
Four sizes — sm 36px, md 44px (default, AAA), lg 52px, xl 60px (hero). Every size meets WCAG 2.5.5 AAA tap target on the height axis; horizontal padding scales proportionally.
.btn--sm 36px / 12px .btn--md 44px / 16px (default) .btn--lg 52px / 24px .btn--xl 60px / 32px (hero) Button states
Five states — default, hover (mouse over), active (pressed), focus (keyboard), disabled, and loading (in-flight async). The loading state shows a spinner and disables clicks.
Icon + label + icon-only
Three patterns: icon+label (button text with leading icon), icon trailing (chevron after text), and icon-only (square aspect for compact toolbars). Every pattern respects the same size ladder.
Icon + label (in-row)
Icon-only (square aspect)
Real-world combinations
The system in context — hero CTAs, in-row actions, full-width mobile stacks, and dialog confirmations.
Hero CTA pair (xl + md)
In-row actions (sm)
Full-width mobile stack (md + block)
WhatsApp CTA (lg)
Loading state in context (form submit)
Legacy aliases
Old class names preserved for HTML compatibility. All aliases
resolve to the canonical .btn + variant + size.
| Legacy class | Canonical | Status |
|---|---|---|
.btn-primary (single dash) | .btn--primary | ✅ preserved |
.btn-secondary | .btn--secondary | ✅ preserved |
.btn-ghost | .btn--ghost | ✅ preserved |
.btn-accent | .btn--accent | ✅ preserved |
.glow-btn | .btn--glow | ✅ preserved |
.home-cta-primary | .btn--glow .btn--primary | ✅ preserved |
.home-cta-secondary | .btn--secondary | ✅ preserved |
.wa-btn | .btn--whatsapp | ✅ preserved |
Aliases are kept indefinitely for HTML compatibility — they're
used in 81+ existing page elements. New code should use canonical
names (.btn--primary over .btn-primary).