UI/UX design standards, accessibility checks (contrast/white-on-white detection), layout grid, typography hierarchy, touch targets, state management, and quality audit guidelines for POSCursor/POS Cursor.
63
79%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./.agents/skills/ui-ux-design-standards/SKILL.mdThis skill defines the authoritative design standards, accessibility requirements, spatial grids, and quality checks for building and reviewing user interfaces across mobile (React Native / Expo) and web environments in POSCursor / POS Cursor.
| Anti-Pattern | Description | Correct Alternative |
|---|---|---|
| 🛑 White-on-White | text-white or text-slate-50 inside a white/light surface (bg-white or bg-slate-50) without a dark container | text-slate-900 dark:text-white |
| 🛑 Dark-on-Dark | text-slate-900 or text-black inside a dark surface (bg-slate-900 or bg-black) | text-white dark:text-slate-100 |
| 🛑 Hardcoded Color on Dynamic Background | <Text style={{ color: '#FFF' }}> inside a card that defaults to light background | Use Tailwind text classes (text-white inside bg-emerald-600) or theme dynamic tokens (text-slate-900 dark:text-white) |
| 🛑 Arbitrary Hex Colors | Using arbitrary hex colors in NativeWind (e.g., bg-[#1E3A8A]) which are unsupported in v4 | Use standard Tailwind color classes (e.g., bg-blue-900) |
| 🛑 Low Contrast Muted Text | text-slate-300 text on a white background | Use text-slate-500 or text-slate-600 for secondary text on light backgrounds |
| 🛑 Missing Dark Mode Variant | Defining bg-white or text-slate-900 without providing matching dark:bg-slate-800 or dark:text-white | Always pair: bg-white dark:bg-slate-800 and text-slate-900 dark:text-slate-100 |
| Surface Context | Primary Text | Secondary / Caption Text | Accent / Icon Color |
|---|---|---|---|
Light Surface (#FFFFFF / bg-white) | #0F172A (text-slate-900) | #475569 (text-slate-600) | #355E3B (text-emerald-700 / primary) |
Light Screen Background (#F8FAFC / bg-slate-50) | #0F172A (text-slate-900) | #64748B (text-slate-500) | #1E293B (text-slate-800) |
Dark Card Surface (#1E293B / bg-slate-800) | #F8FAFC (text-slate-50) | #94A3B8 (text-slate-400) | #34D399 (text-emerald-400) |
Dark Screen Background (#0F172A / bg-slate-900) | #FFFFFF (text-white) | #CBD5E1 (text-slate-300) | #10B981 (text-emerald-500) |
Primary CTA Button (#355E3B / Emerald) | #FFFFFF (text-white) | #D1FAE5 (text-emerald-100) | #FFFFFF (icon color="#FFF") |
Danger / Destructive Button (#DC2626 / Red) | #FFFFFF (text-white) | #FEE2E2 (text-red-100) | #FFFFFF (icon color="#FFF") |
Utilize an 8pt / 4pt spatial grid across all containers, cards, and interactive components:
Spacing Tokens:
- p-1 / gap-1 = 4px (micro gaps, badge padding)
- p-2 / gap-2 = 8px (icon-to-text gaps, tight list items)
- p-3 / gap-3 = 12px (standard button vertical padding, input padding)
- p-4 / gap-4 = 16px (card inner padding, standard stack spacing)
- p-6 / gap-6 = 24px (large section padding, screen margins)px-4 py-4 (mobile) or px-6 py-6 (tablet/web).p-4 rounded-2xl border border-slate-200 dark:border-slate-800 shadow-sm.space-y-3 or gap-3 between list items.mb-4 or mb-6.SafeAreaView or inset utility classes (pt-safe, pb-safe).Maintain strict typographic visual hierarchy so users can scan screens quickly:
// Screen Title (24px, Bold)
<Text className="text-2xl font-bold text-slate-900 dark:text-white tracking-tight">
Collection Overview
</Text>
// Section Subheading (18px, SemiBold)
<Text className="text-lg font-semibold text-slate-800 dark:text-slate-100">
Active Loans
</Text>
// Card Header / Item Title (16px, SemiBold)
<Text className="text-base font-semibold text-slate-900 dark:text-white">
Juan Dela Cruz
</Text>
// Body Text (14px, Regular)
<Text className="text-sm font-normal text-slate-700 dark:text-slate-300">
Daily amortization payment due today.
</Text>
// Caption / Metadata (12px, Medium)
<Text className="text-xs font-medium text-slate-500 dark:text-slate-400">
Ref #LN-2026-0805 • 2 hours ago
</Text>₱1,234.56) using src/utils/currency.ts or <PhpCurrencyText>.font-bold text-slate-900 dark:text-white or text-emerald-600 dark:text-emerald-400 for positive cash-in).Pressable, TouchableOpacity, Button) MUST be at least 44x44 dp (or min-h-[44px] / p-3).p-3.5 or w-11 h-11 items-center justify-center).<Pressable
className="bg-emerald-700 active:opacity-90 active:scale-[0.98] px-4 py-3.5 rounded-xl items-center justify-center min-h-[44px]"
onPress={handlePress}
accessibilityLabel="Submit Payment"
accessibilityRole="button"
>
<Text className="text-white font-semibold text-base">Submit Payment</Text>
</Pressable>Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light) on button clicks, toggle switches, and pull-to-refresh.accessibilityLabel="..." and accessibilityRole="button".Every feature screen and data widget must implement all 5 UI states:
Animated shimmer placeholders matching list item heights) or a centered <ActivityIndicator size="large" color="#355E3B" />. Prevents layout shift."No Active Loans Found"."When new loans are created, they will appear here."."+ Add New Loan"."Try Again" or "Refresh" button."No results matching '...'" + "Clear Filters" button.To deliver a premium visual and interactive experience:
border border-slate-200 dark:border-slate-800) paired with subtle shadows (shadow-sm or shadow-md) rather than heavy dark shadows.bg-emerald-100 text-emerald-800 dark:bg-emerald-900/40 dark:text-emerald-300)bg-amber-100 text-amber-800 dark:bg-amber-900/40 dark:text-amber-300)bg-blue-100 text-blue-800 dark:bg-blue-900/40 dark:text-blue-300)bg-red-100 text-red-800 dark:bg-red-900/40 dark:text-red-300)KeyboardAvoidingView (behavior padding on iOS) + ScrollView (keyboardShouldPersistTaps="handled").text-xs text-red-600 mt-1), focus state ring (focus:border-emerald-600).OfflineBanner) and sync status (SyncStatusBadge).Run the automated UI contrast and accessibility scanner to detect anti-patterns in the codebase:
# Run UI Contrast & Accessibility Audit Script
node scripts/audit-ui-contrast.jstext-white on bg-white).text-slate-900 on bg-slate-900).#fff without dark container styling.accessibilityLabel.dark:bg-* pairs.node scripts/audit-ui-contrast.js with 0 HIGH severity violations.zazakia/JetFarm
bdf360f
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.