Skip to main content
ZICQ

Skills ZICQ category:Design react-native-unistyles-v3

React Native Unistyles V3

Guide for using react-native-unistyles v3. Triggers on: "unistyles", "StyleSheet.create", "create stylesheet", "add theme", "breakpoints", "variants", "withUnistyles", "useUnistyles", "ScopedTheme", "UnistylesRuntime", "style component", "responsive styles", "media queries", "dynamic styles", "scoped theme", "adaptive theme", "unistyles setup", "unistyles config". Covers setup, theming, responsive design, variants, web features, third-party integration, and troubleshooting.

417 installs

Official URL:skills.sh

What this skill does

Intro in this page language first. The official description stays in its original wording; we do not rewrite SKILL.md.

What it does

Guide for using react-native-unistyles v3. Triggers on: "unistyles", "StyleSheet.create", "create stylesheet", "add theme", "breakpoints", "variants", "withUnistyles", "useUnistyles", "ScopedTheme", "UnistylesRuntime", "style component", "responsive styles", "media queries", "dynamic styles", "scoped theme", "adaptive theme", "unistyles setup", "unistyles config". Covers setup, theming, responsive design, variants, web features, third-party integration, and troubleshooting.

When to use it

The official description does not include a separate “Use when”. Per the spec, agents activate this skill when the task matches keywords in that description.

How agents load it

Per Agent Skills progressive disclosure: name and description load at startup (~100 tokens); the full SKILL.md body loads when the skill activates; scripts/, references/, and assets/ load only as needed. This file's sections: React Native Unistyles v3 Skill; Prerequisites; Workflow; Quick Reference; StyleSheet.create — 3 overloads; StyleSheet.configure — one-time setup. It includes spec-recommended sections: step-by-step instructions.

File analysis

File analysis: besides SKILL.md, the body references references/setup-guide.md, references/api-reference.md, references/styling-patterns.md, references/third-party-integration.md, references/common-issues.md. Those resources load on demand.

React Native Unistyles v3 SkillPrerequisitesWorkflowQuick ReferenceStyleSheet.create — 3 overloadsStyleSheet.configure — one-time setupVariantswithUnistyles — wrap third-party components (not React Native or Reanimated components)Critical RulesDecision TreesChoosing a styling approachThird-party component integration

· allowed-tools:Read, Grep, Glob, Edit, Write, Bash(npx *)

Source category:skills.sh agent-skill

SKILL.md & Agent activation

Official spec ↗
name
react-native-unistyles-v3
description
Guide for using react-native-unistyles v3. Triggers on: "unistyles", "StyleSheet.create", "create stylesheet", "add theme", "breakpoints", "variants", "withUnistyles", "useUnistyles", "ScopedTheme", "UnistylesRuntime", "style component", "responsive styles", "media queries", "dynamic styles", "scoped theme", "adaptive theme", "unistyles setup", "unistyles config". Covers setup, theming, responsive design, variants, web features, third-party integration, and troubleshooting.
allowed-tools
Read, Grep, Glob, Edit, Write, Bash(npx *)Experimental field; support depends on the client and does not grant permissions by itself.
  1. DiscoverThe client exposes names and descriptions to the agent.
  2. ActivateYour request or the task context selects the skill and loads its instructions.
  3. Load resourcesReferenced scripts, documentation and assets are used when needed.
Files referenced by the instructions · 5
  • references/setup-guide.md
  • references/api-reference.md
  • references/styling-patterns.md
  • references/third-party-integration.md
  • references/common-issues.md

These paths are extracted from the text. Check the upstream package to verify the files exist.

Invocation syntax and available tools depend on your Agent client. Client integration guide ↗

Install this skill

Skills CLI ↗

Choose the target agent and installation scope, keep referenced package files, then verify the skill appears in the client's catalog.

This skill references supporting files. Retrieve the complete directory from the source; copying SKILL.md alone may leave missing dependencies.

Ask your Agent to install

Copy these instructions to a compatible agent and confirm the target directory matches your client.

Install the agent skill "react-native-unistyles-v3" into my project. The full SKILL.md and official description are at https://zicq.com/en/skills/skl-29f595883d0a05f8-React-Native-Unistyles-V3.html
Save it as .cursor/skills/react-native-unistyles-v3/SKILL.md or .claude/skills/react-native-unistyles-v3/SKILL.md and keep the frontmatter name and description exactly as-is.
This skill also ships scripts/, references/, or assets/ — fetch the whole folder from https://github.com/jpudysz/react-native-unistyles instead of creating only a SKILL.md.

Full package on GitHub ↗

Install from the terminal · Skills CLI

Requires Node.js and npx. First inspect the repository's skill list to confirm the name.

npx skills add 'https://github.com/jpudysz/react-native-unistyles' --list

npx skills add 'https://github.com/jpudysz/react-native-unistyles' --skill 'react-native-unistyles-v3'

The CLI lets you choose the agent interactively. The default scope is the project; use -g for user scope. Confirm package availability with the discovery command, then use npx skills list to inspect installed skills.

Readable layout
--- name: react-native-unistyles-v3 description: > Guide for using react-native-unistyles v3. Triggers on: "unistyles", "StyleSheet.create", "create stylesheet", "add theme", "breakpoints", "variants", "withUnistyles", "useUnistyles", "ScopedTheme", "UnistylesRuntime", "style component", "responsive styles", "media queries", "dynamic styles", "scoped theme", "adaptive theme", "unistyles setup", "unistyles config". Covers setup, theming, responsive design, variants, web features, third-party integration, and troubleshooting. disable-model-invocation: false user-invocable: true allowed-tools: Read, Grep, Glob, Edit, Write, Bash(npx *) --- # React Native Unistyles v3 Skill You are assisting with React Native Unistyles v3 styling. v3 is a zero-re-render styling library with a C++ core (Nitro Modules) and Babel plugin that processes StyleSheets at build time. It replaces React Native's `StyleSheet` with a reactive, theme-aware, responsive system. ## Prerequisites - React Native 0.78+ with **New Architecture mandatory** (default from RN 0.83+) - React 19+ (enforced at runtime) - `react-native-nitro-modules` (native bridge dependency) - `react-native-edge-to-edge` (required for Android edge-to-edge insets) - Expo SDK 53+ (if using Expo; **not compatible with Expo Go** — requires dev client or prebuild) - Xcode 16+ (iOS) ## Workflow 1. **Read user's code first** — understand current setup, imports, and styling approach 2. **Identify intent** — new setup, add theming, responsive design, fix an issue, etc. 3. **Apply v3 patterns** — use the correct API from this skill; consult reference files for details 4. **Verify correctness** — check for critical rule violations (spreading, barrel re-exports, etc.) ## Quick Reference ### StyleSheet.create — 3 overloads ```tsx import { StyleSheet } from 'react-native-unistyles' // 1. Static object compatible with React Native StyleSheet.create const styles = StyleSheet.create({ container: { flex: 1, padding: 16 } }) // 2. Theme function (reactive to theme changes, zero re-renders) const styles = StyleSheet.create(theme => ({ container: { backgroundColor: theme.colors.background } })) // 3. Theme + miniRuntime function (reactive to theme AND device state) const styles = StyleSheet.create((theme, rt) => ({ container: { backgroundColor: theme.colors.background, paddingTop: rt.insets.top, width: rt.screen.width > 768 ? 500 : rt.screen.width - 32 } })) ``` ### StyleSheet.configure — one-time setup ```tsx StyleSheet.configure({ themes: { light: lightTheme, dark: darkTheme }, breakpoints: { xs: 0, sm: 576, md: 768, lg: 992, xl: 1200 }, settings: { initialTheme: 'light', // or: () => storage.getString('theme') ?? 'light' // adaptiveThemes: true, // auto-switch light/dark based on OS (mutually exclusive with initialTheme) // CSSVars: true, // use CSS custom properties on web // nativeBreakpointsMode: 'pixels' | 'points' } }) ``` ### Variants ```tsx const styles = StyleSheet.create(theme => ({ button: { variants: { size: { small: { padding: 4 }, medium: { padding: 8 }, large: { padding: 16 }, }, color: { primary: { backgroundColor: theme.colors.primary }, secondary: { backgroundColor: theme.colors.secondary }, } }, compoundVariants: [ { size: 'large', color: 'primary', styles: { borderWidth: 2 } } ], } })) // In component — call useVariants BEFORE accessing styles styles.useVariants({ size: 'large', color: 'primary' }) return ``` ### withUnistyles — wrap third-party components (not React Native or Reanimated components) ```tsx import { withUnistyles } from 'react-native-unistyles' import { Button } from 'some-library' const UniButton = withUnistyles(Button, (theme, rt) => ({ color: theme.colors.primary, size: rt.screen.width > 400 ? 'large' : 'small' })) // Usage: ``` ## Critical Rules 1. **NEVER spread styles** — `{...styles.x}` breaks C++ proxy binding. ALWAYS use array syntax: `[styles.x, styles.y]` or `[styles.x, { marginTop: 10 }]` 2. **NEVER re-export StyleSheet from barrel files** — the Babel plugin detects `StyleSheet.create` by import source. Re-exporting breaks detection. 3. **Babel plugin is REQUIRED** — add `['react-native-unistyles/plugin', { root: 'src' }]` to babel.config.js. Without it, styles won't be reactive. 4. **Import StyleSheet from `react-native-unistyles` only** — it polyfills all RN StyleSheet APIs (`hairlineWidth`, `compose`, `flatten`, `absoluteFill`). Replace all `import { StyleSheet } from 'react-native'`. 5. **`styles.useVariants()` must be called before accessing variant-dependent styles** — treat it like a React hook (top of component). 6. **Prefer `StyleSheet.create(theme => ...)` over `useUnistyles()`** — theme functions cause zero re-renders; `useUnistyles()` re-renders on every theme/runtime change. 7. **`StyleSheet.configure()` must be called before any `StyleSheet.create()`** — typically in your app entry point, before any component renders. ## Decision Trees ### Choosing a styling approach ``` Need theme/runtime in styles? ├─ YES → StyleSheet.create((theme, rt) => ...) [zero re-renders] └─ NO → StyleSheet.create({ ... }) [static styles] Need theme values as non-style props? ├─ YES → withUnistyles(Component, (theme, rt) => ({ propName: theme.value })) └─ NO → Pass Unistyles styles via style prop directly Need theme/runtime in component logic (not just styles)? ├─ YES → useUnistyles() hook [causes re-renders] └─ NO → Use StyleSheet.create with theme function ``` ### Third-party component integration ``` Does the component accept a `style` prop? ├─ YES → Pass Unistyles styles directly (Babel auto-processes standard RN views) │ If it's a custom native view → add to autoProcessPaths in Babel config ├─ NO → Does it accept theme-derived props (color, size, etc.)? │ ├─ YES → withUnistyles(Component, (theme, rt) => ({ prop: theme.value })) │ └─ NO → useUnistyles() as fallback └─ Component from node_modules not processed? → Add its path to autoProcessPaths or autoProcessImports in Babel plugin config ``` ## Reference Files - **Setup, installation, Babel plugin, TypeScript, testing, Expo Router**: read [references/setup-guide.md](references/setup-guide.md) - **Complete API for every export**: read [references/api-reference.md](references/api-reference.md) - **Code patterns: themes, variants, breakpoints, web, SSR, Reanimated**: read [references/styling-patterns.md](references/styling-patterns.md) - **withUnistyles, autoProcessPaths, React Compiler, Reanimated, FlatList**: read [references/third-party-integration.md](references/third-party-integration.md) - **Troubleshooting from 150+ GitHub issues with solutions**: read [references/common-issues.md](references/common-issues.md)

Related skills

Design

Automation Workflows

Design and implement automation workflows to save time and scale operations as a solopreneur. Use when identifying repetitive tasks to autom…

Design

Ui Ux Pro Max

UI/UX design intelligence and implementation guidance for building polished interfaces. Use when the user asks for UI design, UX flows, info…

Design

Frontend Design

Expert frontend design guidelines for creating beautiful, modern UIs. Use when building landing pages, dashboards, or any user interface.

Design

N8n Workflow Automation

Designs and outputs n8n workflow JSON with robust triggers, idempotency, error handling, logging, retries, and human-in-the-loop review queu…