skill
Expo Design System
نبذة
# Expo Design Systems
Make every screen in an app draw from one visual source of truth: a token theme and a small set of reusable components. This skill defines where tokens live, what they cover, how reusable components are shaped, and when a repeated view earns promotion into the system.
Sibling skills own the layers around this one:
- `expo-native-ui` - platform styling rules (HIG, semantic colors, controls, shadows syntax). Follow it for **what values look native**; follow this skill for **where values live and how they're reused**. - `expo-project-structure` - folder skeleton for new apps.
For Tailwind projects, keep tokens in `global.css` as CSS variables and follow the styling library's own setup guidance. The scales and naming in this skill still apply; only the storage format changes.
## References
Consult these resources as needed:
``` references/ audit.md Audit an existing app for design-system drift: grep checks, scoring rubric, incremental adoption plan, and templates for documenting or extending components native-slop.md The 20 named anti-pattern tells of AI-generated apps (The Web Modal, Everything's a Card, ...) with grep checks for the greppable ones ```
## Adopt Before You Build
In an app that already has screens, the first move is detection, not construction. Before writing any token file:
1. **Look for a declared system.** Check `package.json` for a styling library - NativeWind/Tailwind, Tamagui, Restyle, Unistyles, styled-components. Then look for a token file: `theme.ts`, `src/theme/`, `constants/theme.ts`, or `constants/Colors.ts` (the create-expo-app default). 2. **If one exists, it is the source of truth.** Extend it in its own idiom - its names, its scale, its storage format. Audit drift against that system, not against the examples below. 3. **If only de facto values exist** - the same greys and paddings repeated across screens, no theme file - there is no system yet. Those values are the input to the scales, not the authority: derive tokens from the most frequent ones, snapped to the 4-point grid (`references/audit.md` §5). 4. **Never introduce a second system beside an existing one.** A fresh `src/theme/` next to a Tamagui config is design-system drift, not adoption.
Only when nothing exists do the defaults below apply as written.
## The Theme
In an app without an existing system, all design tokens live under `src/theme/`. In a project without a `src/` folder (the default `create-expo-app` template has `app/`, `components/`, and `constants/` at the root), use the equivalent top-level location - typically `theme/` or the existing `constants/` - and keep the same file layout. Start small and split by token class as it grows:
``` src/theme/ colors.ts # see expo-native-ui "Colors" for the palette pattern spacing.ts typography.ts radius.ts shadows.ts motion.ts index.ts # re-exports everything: import { spacing, type } from "@/theme" ```
A brand-new app can begin with a single `src/theme.ts` holding all of the objects below, then promote it to the folder form once any one class needs its own file (same promotion rule as components). Either way there is exactly **one** theme entry point - never two competing token files.
Rules that make a theme worth having:
- **Every repeated visual value is a token.** A literal that appears twice belongs in the theme. - **Components import tokens; screens import components.** A screen file that imports `spacing` for layout padding is fine; a screen file redefining a button color is drift. - **Never hardcode** hex colors, font sizes, or spacing multiples outside `src/theme/`. One-off values that are genuinely local (an icon's 17px optical nudge) may stay inline - with a comment saying why.
### Colors
Build the palette from platform semantic colors: `Color` from `expo-router` wrapped in `Platform.select`, centralized in `theme/colors.ts`. Semantic colors resolve on-device and adapt to light/dark automatically - prefer them for backgrounds, labels, and separators. (`expo-native-ui` "Colors" covers the full palette and rationale; the minimal version is:)
```tsx // theme/colors.ts import { Platform } from "react-native"; import { Color } from "expo-router";
export const colors = { label: Platform.select({ ios: Color.ios.label, android: Color.android.dynamic.onSurface, default: "#000000", })!, secondaryLabel: Platform.select({ ios: Color.ios.secondaryLabel, android: Color.android.dynamic.onSurfaceVariant, default: "#3c3c43", })!, separator: Platform.select({ ios: Color.ios.separator, android: Color.android.dynamic.outlineVariant, default: "#c6c6c8", })!, systemBackground: Platform.select({ ios: Color.ios.systemBackground, android: Color.android.dynamic.surface, default: "#ffffff", })!, systemBlue: Platform.select({ ios: Color.ios.systemBlue, android: Color.android.dynami
التثبيت
شغل هذا الأمر
git clone https://github.com/expo/skills && cp -r skills/plugins/expo/skills/expo-design-system ~/.claude/skills/يعمل مع
خطوات التثبيت
Clone the repository and copy the `plugins/expo/skills/expo-design-system` folder into your Claude skills directory. Compatible with Claude Code, Cursor, Codex, and any Agent Skills-compatible agent.
أسئلة شائعة
كيف أثبت Expo Design System؟
شغل هذا الأمر في الطرفية:
git clone https://github.com/expo/skills && cp -r skills/plugins/expo/skills/expo-design-system ~/.claude/skills/مع أي أدوات ذكاء اصطناعي تعمل Expo Design System؟
تعمل مع claude_app، claude_code، claude_api، cursor، codex، windsurf، cline، zed.
من طور Expo Design System؟
طورها Expo، وتصدر بترخيص MIT.
هل Expo Design System مجانية؟
نعم، يمكنك استخدامها مجانا وفق ترخيص MIT.
npx skills add google/agents-cli
npx skills add google/agents-cli
npx skills add google/agents-cli
npx skills add google/agents-cli
npx skills add google/agents-cli
npx skills add prisma/skills
افحص قبل التثبيت
شغل أي مصدر عبر فحوصاتنا - الظهور في الذكاء الاصطناعي والأمان والأداء واكتشاف التقنيات.
فحص أمني تلقائي للموقع
الأمان
محلل سرعة الصفحة
الأداء
اختبار جودة المحتوى العربي بالذكاء الاصطناعي
جودة المحتوى
مختبر وكلاء الذكاء الاصطناعي
اختبار الذكاء الاصطناعي
كاشف منصة الموقع
الترحيل
تدقيق الظهور في محركات الذكاء الاصطناعي
الظهور في الذكاء الاصطناعي
مولد ملف llms.txt
الظهور في الذكاء الاصطناعي
مقياس سهولة القراءة بالعربية
جودة المحتوى
منشئ البيانات المنظمة
الظهور في الذكاء الاصطناعي
حاسبة تكاليف الذكاء الاصطناعي
اختبار الذكاء الاصطناعي
محلل العناوين العربية
جودة المحتوى