Install the "uniwind" agent skill from https://github.com/CherryHQ/cherry-studio-app/tree/main/.agents/skills/uniwind into .claude/skills/uniwind/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniwind", then confirm the skill loads.
Claude Code copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Type this inside Codex. $skill-installer <name> installs a curated skill from openai/skills. The installer writes to $CODEX_HOME/skills (default ~/.codex/skills). Restart Codex if the skill does not show up.
skills CLI
$ npx skills add CherryHQ/cherry-studio-app --skill uniwind -a codex
Project install goes to .agents/skills/; add -g for ~/.codex/skills/.
Install the "uniwind" agent skill from https://github.com/CherryHQ/cherry-studio-app/tree/main/.agents/skills/uniwind into .agents/skills/uniwind/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniwind", then confirm the skill loads.
Codex copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add CherryHQ/cherry-studio-app --skill uniwind -a cursor
Project install goes to .agents/skills/; add -g for ~/.cursor/skills/.
Install the "uniwind" agent skill from https://github.com/CherryHQ/cherry-studio-app/tree/main/.agents/skills/uniwind into .cursor/skills/uniwind/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniwind", then confirm the skill loads.
Cursor copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
--scope user (default) or --scope workspace; --path is the subfolder of the repo that holds the skill; --consent skips the security confirmation prompt.
skills CLI
$ npx skills add CherryHQ/cherry-studio-app --skill uniwind -a gemini-cli
Project install goes to .agents/skills/; add -g for ~/.gemini/skills/.
Install the "uniwind" agent skill from https://github.com/CherryHQ/cherry-studio-app/tree/main/.agents/skills/uniwind into .gemini/skills/uniwind/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniwind", then confirm the skill loads.
Gemini CLI copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Installs for Copilot at project scope by default; add --scope user for a personal install. Preview a skill first with gh skill preview. Needs GitHub CLI 2.90.0 or later (public preview).
skills CLI
$ npx skills add CherryHQ/cherry-studio-app --skill uniwind -a github-copilot
Project install goes to .agents/skills/; add -g for ~/.copilot/skills/.
Install the "uniwind" agent skill from https://github.com/CherryHQ/cherry-studio-app/tree/main/.agents/skills/uniwind into .github/skills/uniwind/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniwind", then confirm the skill loads.
GitHub Copilot copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
skills CLI
$ npx skills add CherryHQ/cherry-studio-app --skill uniwind -a opencode
OpenCode documents no install command of its own. Project install goes to .agents/skills/; add -g for ~/.config/opencode/skills/.
Install the "uniwind" agent skill from https://github.com/CherryHQ/cherry-studio-app/tree/main/.agents/skills/uniwind into .opencode/skills/uniwind/ in this project. Copy the whole folder (SKILL.md and every file beside it), keep the folder name "uniwind", then confirm the skill loads.
OpenCode copies the folder itself, the same result as the manual copy. Check what it changed before you commit it.
Facts
Skill name
uniwind
GitHub stars
4k
Token cost
~20k tokens
SKILL.md length
5,407 words
Files
1
Skills in repo
13
Repo updated
First seen
Licence
AGPL-3.0
At a glance
Uniwind — Tailwind CSS v4 styling for React Native. An agent skill from CherryHQ/cherry-studio-app.
Works in 3 steps: Variable-driven utilities… → Brand-new utilities (no Tailwind… → Overriding existing Tailwind utilities
Styling components in a React Native project that uses Tailwind with className
SKILL.md covers Critical Rules, Setup, Component Bindings and The accent- Prefix Pattern, plus 6 more sections
Calls npx, npm and bun
What it does
Uniwind is an agent skill from CherryHQ/cherry-studio-app. Uniwind — Tailwind CSS v4 styling for React Native. Use when adding, building, or styling components in a React Native project that uses Tailwind with className.
Its SKILL.md is about 20k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.
It sits in Mobile, covering Cross-platform mobile apps and CSS and styling. It works with Tailwind CSS, React Native and Expo. The repository describes itself as: 🍒 This is the mobile version of Cherry Studio. The licence is AGPL-3.0.
When your agent uses it
Styling components in a React Native project that uses Tailwind with className
Tasks that involve Cross-platform mobile apps
Tasks that involve CSS and styling
Example prompts
“/uniwind”
Workflow steps
3 steps, taken from the step headings in SKILL.md.
Read from SKILL.md and the folder at commit fcfd953. It shows what the files ask for, not the result of running them.
Tool permissions
Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.
From allowed-tools in the SKILL.md frontmatter.
Runs code
Shell commands in SKILL.md call:
npx
npm
bun
pnpm
From the folder's file list and the shell code blocks in SKILL.md.
Network
Links to these hosts (documentation or services it may open):
docs.uniwind.dev
uniwind.dev
From URLs in SKILL.md, links to its own repository left out.
Credentials
Names no API keys, tokens, secrets or passwords.
From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.
Context cost
Uniwind loads about 20k tokens when it runs. Until then it costs about 42 tokens; SKILL.md has 5,407 words of instructions outside code blocks.
Always· name and description, kept in context so the agent knows when to use it
~42
When it runs· the whole SKILL.md, loaded when a task matches
~20k
Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.
Safety
Auto-check: warnings
The automated check found patterns that need a careful read before installing.
WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:1617
# .npmrc
WarningMentions a credentials file (SSH keys, cloud or package-manager tokens)SKILL.md:2047
blic-hoist-pattern[]=heroui-native` to `.npmrc` |
Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.
Download SKILL.mdSave it as .claude/skills/uniwind/SKILL.md (or your agent's skills folder).
name
uniwind
description
Uniwind — Tailwind CSS v4 styling for React Native. Use when adding, building, or styling components in a React Native project that uses Tailwind with className.
If user has lower version, recommend updating to 1.6.0+ for best experience.
Uniwind brings Tailwind CSS v4 to React Native. All core React Native components support the className prop out of the box. Styles are compiled at build time — no runtime overhead.
Critical Rules
Tailwind v4 only — Use @import 'tailwindcss' not @tailwind base. Tailwind v3 is not supported.
Never construct classNames dynamically — Tailwind scans at build time. bg-${color}-500 will NOT work. Use complete string literals, mapping objects, or ternaries.
Never use cssInterop or remapProps — Those are NativeWind APIs. Uniwind does not override global components.
No tailwind.config.js — All config goes in global.css via @theme and @layer theme.
No ThemeProvider required — Use Uniwind.setTheme() directly.
withUniwindConfig must be the outermost Metro config wrapper.
NEVER wrap react-native or react-native-reanimated components with withUniwind — View, Text, Pressable, Image, TextInput, ScrollView, FlatList, Switch, Modal, Animated.View, Animated.Text, etc. already have full className support built in. Wrapping them with withUniwind will break behavior. Only use withUniwind for third-party components (e.g., expo-image, expo-blur, moti).
Font families: single font only — React Native doesn't support fallbacks. Use --font-sans: 'Roboto-Regular' not 'Roboto', sans-serif.
All theme variants must define the same set of CSS variables — If light defines --color-primary, then dark and every custom theme must too. Mismatched variables cause runtime errors.
accent- prefix is REQUIRED for non-style color props — This is crucial. Props like color (Button, ActivityIndicator), tintColor (Image), thumbColor (Switch), placeholderTextColor (TextInput) are NOT part of the style object. You MUST use the corresponding {propName}ClassName prop with accent- prefixed classes. Example: <ActivityIndicator colorClassName="accent-blue-500" /> NOT <ActivityIndicator className="text-blue-500" />. Regular Tailwind color classes (like text-blue-500) only work on className (which maps to style). For non-style color props, always use accent-.
rem default is 16px — NativeWind used 14px. Set polyfills: { rem: 14 } in metro config if migrating.
cssEntryFile must be a relative path string — Use './global.css' not path.resolve(__dirname, 'global.css').
Deduplicate with cn() when mixing custom CSS classes and Tailwind — Uniwind does NOT auto-deduplicate. If a custom CSS class (.card { padding: 16px }) and a Tailwind utility (p-6) set the same property, both apply with unpredictable results. Always wrap with cn('card', 'p-6') when there's overlap.
Important utilities are supported — Tailwind important modifier works in classNames with ! at the end: bg-red-500!, active:bg-red-500!, ios:pt-12!. Leading !bg-red-500 syntax is deprecated. Important utilities override non-important utilities for the same style property, but inline style still overrides className.
Setup
Installation
bash
# or other package manager
bun install uniwind tailwindcss
Requires Tailwind CSS v4+.
global.css
Create a CSS entry file:
css
@import 'tailwindcss';
@import 'uniwind';
Import in your App component (e.g., App.tsx or app/_layout.tsx), NOT in index.ts/index.js — importing there breaks hot reload:
tsx
// app/_layout.tsx or App.tsx
import './global.css';
The directory containing global.css is the app root — Tailwind scans for classNames starting from this directory.
Metro Configuration
js
const { getDefaultConfig } = require('expo/metro-config');
// Bare RN: const { getDefaultConfig } = require('@react-native/metro-config');
const { withUniwindConfig } = require('uniwind/metro');
const config = getDefaultConfig(__dirname);
// withUniwindConfig MUST be the OUTERMOST wrapper
module.exports = withUniwindConfig(config, {
cssEntryFile: './global.css', // Required — relative path from project root
polyfills: { rem: 16 }, // Optional — base rem value (default 16)
extraThemes: ['ocean', 'sunset'], // Optional — custom themes beyond light/dark
dtsFile: './uniwind-types.d.ts', // Optional — TypeScript types output path
debug: true, // Optional — log unsupported CSS in dev
isTV: false, // Optional — enable TV platform support
});
For most flows, keep defaults, only provide cssEntryFile.
Wrapper order — Uniwind must wrap everything else:
If user has storybook setup, add extra vite config:
ts
import tailwindcss from '@tailwindcss/vite';
import { uniwind } from 'uniwind/vite';
import { defineConfig } from 'vite';
export default defineConfig({
plugins: [
tailwindcss(),
uniwind({
cssEntryFile: './src/global.css',
dtsFile: './src/uniwind-types.d.ts',
}),
],
});
TypeScript
Uniwind auto-generates a .d.ts file (default: ./uniwind-types.d.ts) after running Metro. Place it in src/ or app/ for auto-inclusion, or add to tsconfig.json:
json
{ "include": ["./uniwind-types.d.ts"] }
If user has some typescript errors related to classNames, just run metro server to build the d.ts file.
Also needed for node_modules packages that contain Uniwind classes (e.g., shared UI libraries).
Component Bindings
All core React Native components support className out of the box. Some have additional className props for sub-styles (like contentContainerClassName) and non-style color props (requiring accent- prefix).
Complete Reference
Legend: Props marked with ⚡ require the accent- prefix. Props in parentheses are platform-specific.
View
Prop
Maps to
Prefix
className
style
—
Text
Prop
Maps to
Prefix
className
style
—
selectionColorClassName
selectionColor
⚡ accent-
Pressable
Prop
Maps to
Prefix
className
style
—
Supports active:, disabled:, focus: state selectors.
Image
Prop
Maps to
Prefix
className
style
—
tintColorClassName
tintColor
⚡ accent-
TextInput
Prop
Maps to
Prefix
className
style
—
cursorColorClassName
cursorColor
⚡ accent-
selectionColorClassName
selectionColor
⚡ accent-
placeholderTextColorClassName
placeholderTextColor
⚡ accent-
selectionHandleColorClassName
selectionHandleColor
⚡ accent-
underlineColorAndroidClassName
underlineColorAndroid (Android)
⚡ accent-
Supports focus:, active:, disabled: state selectors.
ScrollView
Prop
Maps to
Prefix
className
style
—
contentContainerClassName
contentContainerStyle
—
endFillColorClassName
endFillColor
⚡ accent-
FlatList
Prop
Maps to
Prefix
className
style
—
contentContainerClassName
contentContainerStyle
—
columnWrapperClassName
columnWrapperStyle
—
ListHeaderComponentClassName
ListHeaderComponentStyle
—
ListFooterComponentClassName
ListFooterComponentStyle
—
endFillColorClassName
endFillColor
⚡ accent-
SectionList
Prop
Maps to
Prefix
className
style
—
contentContainerClassName
contentContainerStyle
—
ListHeaderComponentClassName
ListHeaderComponentStyle
—
ListFooterComponentClassName
ListFooterComponentStyle
—
endFillColorClassName
endFillColor
⚡ accent-
VirtualizedList
Prop
Maps to
Prefix
className
style
—
contentContainerClassName
contentContainerStyle
—
ListHeaderComponentClassName
ListHeaderComponentStyle
—
ListFooterComponentClassName
ListFooterComponentStyle
—
endFillColorClassName
endFillColor
⚡ accent-
Switch
Prop
Maps to
Prefix
thumbColorClassName
thumbColor
⚡ accent-
trackColorOnClassName
trackColor.true (on)
⚡ accent-
trackColorOffClassName
trackColor.false (off)
⚡ accent-
ios_backgroundColorClassName
ios_backgroundColor (iOS)
⚡ accent-
Note: Switch does NOT support className (className?: never in types). Use only the color-specific className props above. Supports disabled: state selector.
ActivityIndicator
Prop
Maps to
Prefix
className
style
—
colorClassName
color
⚡ accent-
Button
Prop
Maps to
Prefix
colorClassName
color
⚡ accent-
Note: Button does not support className (no style prop on RN Button).
React Native components have props like color, tintColor, thumbColor that are NOT part of the style object. To set these via Tailwind classes, use the accent- prefix with the corresponding {propName}ClassName prop:
CRITICAL Rule: className maps to the style prop — it handles layout, typography, backgrounds, borders, etc. But React Native has many color props that live OUTSIDE of style (like color, tintColor, thumbColor, placeholderTextColor). These require a separate {propName}ClassName prop with the accent- prefix. Without accent-, the class resolves to a style object — but these props expect a plain color string.
tsx
// WRONG — className sets style, but ActivityIndicator's color is NOT a style prop
<ActivityIndicator className="text-blue-500" /> // color will NOT be set
// CORRECT — use the dedicated colorClassName prop with accent- prefix
<ActivityIndicator colorClassName="accent-blue-500" /> // color IS set to #3b82f6
// WRONG — tintColor is not a style prop on Image
<Image className="tint-blue-500" source={icon} /> // won't work
// CORRECT
<Image tintColorClassName="accent-blue-500" source={icon} />
Styling Third-Party Components
withUniwind (Recommended)
Wrap once at module level, use with className everywhere:
tsx
import { withUniwind } from 'uniwind';
import { Image as ExpoImage } from 'expo-image';
import { BlurView as RNBlurView } from 'expo-blur';
import { LinearGradient as RNLinearGradient } from 'expo-linear-gradient';
// Module-level wrapping (NEVER inside render functions)
export const Image = withUniwind(ExpoImage);
export const BlurView = withUniwind(RNBlurView);
export const LinearGradient = withUniwind(RNLinearGradient);
Used in one file only — define the wrapped component in that same file
Used across multiple files — wrap once in a shared module (e.g., components/styled.ts) and re-export
tsx
// components/styled.ts
import { withUniwind } from 'uniwind';
import { Image as ExpoImage } from 'expo-image';
export const Image = withUniwind(ExpoImage);
// Then import everywhere:
import { Image } from '@/components/styled';
NEVER call withUniwind on the same component in multiple files.
CRITICAL: Do NOT use withUniwind on components from react-native or react-native-reanimated. These already have built-in className support:
tsx
// WRONG — View already supports className natively
const StyledView = withUniwind(View); // DO NOT DO THIS
const StyledText = withUniwind(Text); // DO NOT DO THIS
const StyledAnimatedView = withUniwind(Animated.View); // DO NOT DO THIS
// CORRECT — only wrap third-party components
const StyledExpoImage = withUniwind(ExpoImage); // expo-image
const StyledBlurView = withUniwind(BlurView); // expo-blur
const StyledMotiView = withUniwind(MotiView); // moti
useResolveClassNames
Converts Tailwind class strings to React Native style objects. Use for one-off cases or components that only accept style:
Uniwind does NOT auto-deduplicate conflicting classNames. This means if the same property appears in multiple classes, both will be applied and the result is unpredictable. This is especially critical when mixing custom CSS classes with Tailwind utilities.
Setup
bash
npm install tailwind-merge clsx
ts
// lib/cn.ts
import { type ClassValue, clsx } from 'clsx';
import { twMerge } from 'tailwind-merge';
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
When cn Is Required
Merging className props — component accepts external className that may conflict:
CRITICAL: Mixing custom CSS classes with Tailwind utilities — if your custom CSS class sets a property that a Tailwind utility also sets, you MUST use cn() to deduplicate:
Static className with no conflicts: <View className="flex-1 p-4 bg-white" />
Single custom CSS class with no overlapping Tailwind: <View className="card-shadow mt-4" /> (if card-shadow only sets box-shadow which no Tailwind class also sets)
Important Utilities and Style Specificity
Uniwind supports Tailwind's important modifier (!) for utilities that must override another utility for the same style property.
tsx
import { View, Pressable } from 'react-native';
// bg-red-500! has higher priority than bg-blue-500
<View className="bg-blue-500 bg-red-500!" />;
// Important utilities work with state and platform variants
<Pressable className="bg-blue-500 active:bg-red-500!" />;
<View className="pt-4 ios:pt-12! android:pt-8!" />;
Priority rules:
Important utility (bg-red-500!) overrides non-important utility (bg-blue-500) for the same property.
Important variants work normally: active:bg-red-500!, ios:pt-12!, dark:text-white!.
Inline style always wins, even over important className utilities: <View className="bg-red-500!" style={{ backgroundColor: 'blue' }} /> renders blue.
Use ! sparingly. For reusable components and consumer overrides, prefer cn() with tailwind-merge.
import { Uniwind, useUniwind } from 'uniwind';
// Imperative (no re-render)
Uniwind.setTheme('dark'); // Force dark
Uniwind.setTheme('light'); // Force light
Uniwind.setTheme('system'); // Follow device (re-enables adaptive themes)
Uniwind.setTheme('ocean'); // Custom theme (must be in extraThemes)
Uniwind.currentTheme; // Current theme name
Uniwind.hasAdaptiveThemes; // true if following system
// Reactive hook (re-renders on change)
const { theme, hasAdaptiveThemes } = useUniwind();
Uniwind.setTheme('light') / setTheme('dark') also calls Appearance.setColorScheme to sync native components (Alert, Modal, system dialogs).
By default Uniwind uses "system" theme - follows device color scheme. If user wants to override it, just
call Uniwind.setTheme with desired theme. It can be done above the React component to avoid theme switching at runtime.
Hooks (useUniwind, useResolveClassNames, useCSSVariable) resolve against the nearest scoped theme
withUniwind-wrapped components inside the scope also resolve scoped theme values
Custom themes require registration in extraThemes
useCSSVariable
Access CSS variable values in JavaScript:
tsx
import { useCSSVariable } from 'uniwind';
const primaryColor = useCSSVariable('--color-primary');
const spacing = useCSSVariable('--spacing-4');
// Multiple variables at once
const [bg, fg] = useCSSVariable(['--color-background', '--color-foreground']) as [string, string]
Use for: animations, chart libraries, third-party component configs, calculations with design tokens.
It's required to cast the result of useCSSVariable as it can return: string | number | undefined.
Uniwind doesn't know if given variable exist and what type it is, so it returns union type.
getCSSVariable
Read CSS variable values outside of React (event handlers, async callbacks, utility modules, worklets). Available in Uniwind 1.6.4+.
ts
import { Uniwind } from 'uniwind';
const primary = Uniwind.getCSSVariable('--color-primary');
const [bg, fg] = Uniwind.getCSSVariable(['--color-background', '--color-foreground']) as [string, string];
Same value rules as useCSSVariable (variable must be used in a className or declared in @theme static). Same return type: string | number | undefined. Cast as needed.
Not reactive — value is read once. For reactive values inside components use useCSSVariable. Use getCSSVariable for one-shot reads (onPress handlers, utility functions, native module configs).
Runtime CSS Variable Updates
Update theme variables at runtime (e.g., user-selected brand colors or API-driven themes):
Wide-gamut color format for devices that support the P3 color space (most modern iPhones and Macs). Uniwind parses color(display-p3 ...) values and converts them for native use:
Design mobile-first — start with base styles (no prefix), enhance with breakpoints:
tsx
// CORRECT — mobile-first
<View className="w-full sm:w-3/4 md:w-1/2 lg:w-1/3" />
// WRONG — desktop-first (reversed order is confusing and fragile)
<View className="w-full lg:w-1/2 md:w-3/4 sm:w-full" />
Safe Area Utilities
Padding
Class
Description
p-safe
All sides
pt-safe / pb-safe / pl-safe / pr-safe
Individual sides
px-safe / py-safe
Horizontal / vertical
Margin
Class
Description
m-safe
All sides
mt-safe / mb-safe / ml-safe / mr-safe
Individual sides
mx-safe / my-safe
Horizontal / vertical
Positioning
Class
Description
inset-safe
All sides
top-safe / bottom-safe / left-safe / right-safe
Individual sides
x-safe / y-safe
Horizontal / vertical inset
Compound Variants
Pattern
Behavior
Example
{prop}-safe-or-{value}
Math.max(inset, value) — ensures minimum spacing
pt-safe-or-4
{prop}-safe-offset-{value}
inset + value — adds extra spacing on top of inset
pb-safe-offset-4
Setup
Uniwind Free (default) — requires react-native-safe-area-context to update insets.
Wrap your App component in SafeAreaProvider and SafeAreaListener and call Uniwind.updateInsets(insets) in the onChange callback:
Uniwind Pro — automatic, no setup needed. Insets injected from native layer.
CSS Functions
Uniwind provides CSS functions for device-aware and theme-aware styling. These can be used everywhere (custom CSS classes, @utility, etc.) — but NOT inside @theme {} (which only accepts static values). Use @utility to create reusable Tailwind-style utility classes:
hairlineWidth()
Returns the thinnest line width displayable on the device. Use for subtle borders and dividers.
Uniwind supports custom CSS class names defined in global.css. They are compiled at build time — no runtime overhead. Use them when you need styles that are hard to express as Tailwind utilities (e.g., complex box-shadow, multi-property bundles).
WARNING: If a custom CSS class and a Tailwind utility set the same property, you MUST use cn() to deduplicate. Without cn(), both values apply and the result is unpredictable:
tsx
// WRONG — .container sets flex:1, and flex-1 also sets flex:1 (harmless but wasteful)
// WRONG — .container sets width:100%, and w-full also sets width:100% (redundant)
// DANGEROUS — .card-shadow sets border-radius:12px, and rounded-2xl sets border-radius:16px — CONFLICT!
<View className="card-shadow rounded-2xl" />
// CORRECT — cn ensures rounded-2xl wins
import { cn } from '@/lib/cn';
<View className={cn('card-shadow', 'rounded-2xl')} />
Rule of thumb: If your custom CSS class sets properties that might overlap with Tailwind utilities you'll also use, always wrap with cn(). See cn Utility section for full setup.
Guidelines for Custom CSS
Keep selectors flat — no deep nesting or child selectors
Prefer Tailwind utilities for simple, single-property styles
Use custom classes for complex or multi-property bundles that would be verbose in className
Use light-dark() for theme-aware custom classes
Custom classes are great for shared design tokens that don't fit Tailwind's naming (e.g., .card, .chip, .badge-dot)
Custom Utilities (@utility)
The @utility directive creates utility classes that work exactly like built-in Tailwind classes. Three main use cases:
Create a utility whose value comes from a CSS variable injected at runtime via updateCSSVariables. Use @theme static to declare the variable so Uniwind tracks it even before it is updated:
For expo-linear-gradient, you can wrap it with withUniwind for className-based layout and styling (padding, border-radius, flex, etc.), but the colors prop is an array that cannot be resolved via className — it must be provided explicitly. Use useCSSVariable to get theme-aware colors:
tsx
import { useCSSVariable } from 'uniwind';
import { withUniwind } from 'uniwind';
import { LinearGradient as RNLinearGradient } from 'expo-linear-gradient';
const LinearGradient = withUniwind(RNLinearGradient);
function GradientCard() {
// useCSSVariable returns string | number | undefined
const primary = useCSSVariable('--color-primary');
const secondary = useCSSVariable('--color-secondary');
// Guard against undefined — LinearGradient.colors requires valid ColorValues
if (!primary || !secondary) {
return null;
}
return (
<LinearGradient
className="flex-1 rounded-2xl p-6"
colors={[primary as string, secondary as string]}
>
<Text className="text-white font-bold">Themed gradient</Text>
</LinearGradient>
);
}
Alternatively, export a wrapped component from a shared module for reuse:
tsx
// components/styled.ts
import { withUniwind } from 'uniwind';
import { LinearGradient as RNLinearGradient } from 'expo-linear-gradient';
export const LinearGradient = withUniwind(RNLinearGradient);
Keep React Navigation's <ThemeProvider> if already in use — it manages navigation-specific theming.
UI Kit Compatibility
HeroUI Native: Works with Uniwind. Uses tailwind-variants (tv) internally. Apply className directly on HeroUI components. Bun users: Bun uses symlinks for node_modules, which can cause Tailwind's Oxide scanner to miss library classes in production builds. Fix: use the resolved path in @source and hoist the package:css
@source "../../node_modules/heroui-native/lib";
ini
# .npmrc
public-hoist-pattern[]=heroui-native
react-native-reusables: Compatible.
Gluestack v4.1+: Compatible.
Lucide React Native: Use withUniwind(LucideIcon) with colorClassName="accent-blue-500" for icon color. Works for all Lucide icons.
@shopify/flash-list: Use withUniwind(FlashList) for className and contentContainerClassName support. Note: withUniwind loses generic type params on ref — cast manually if needed.
Use semantic color tokens (bg-primary, text-foreground) for theme consistency across UI kits.
Supported vs Unsupported Classes
React Native uses the Yoga layout engine. Key differences from web CSS:
No CSS cascade/inheritance — styles don't inherit from parents
Flexbox by default — all views use flexbox with flexDirection: 'column'
Limited CSS properties — no floats, grid, pseudo-elements
Built-in Extra Utilities
Uniwind provides additional utility classes for React Native features not covered by standard Tailwind:
Paid upgrade with 100% API compatibility. Built on a 2nd-generation C++ engine for apps that demand the best performance. Graduated pricing (billed annually): $99/seat (1-3), $49 (4-6), $29 (7-15), $1 (16+). Pricing and licensing: https://uniwind.dev/pricing
Pricing & Licensing
Graduated per-seat pricing (billed annually, VAT excluded unless applicable): $99 for seats 1-3, $49 for 4-6, $29 for 7-15, $1 for 16+
Individual License: Personal Pro license per engineer
Team License: Single key management — add or remove members instantly
CI/CD License: Full support for automated and headless build environments
Priority Support: Critical issues resolved with priority response times
Overview
C++ style engine: Forged on the 2nd-gen Unistyles C++ engine. Injects styles directly into the ShadowTree without triggering React re-renders — a direct, optimized highway between classNames and the native layer
Performance: Benchmarked at ~55ms (vs StyleSheet 49ms, traditional Uniwind 81ms, NativeWind 197ms) — near-native speed
55+ className props update without re-renders across 20 components (all component bindings listed above)
Reanimated animations: animate-* and transition-* via className (Reanimated v4)
Native insets & runtime values: Automatic safe area injection, device rotation, and font size updates — no SafeAreaListener setup needed
Theme transitions: Native animated transitions when switching themes (fade, slide, circle mask)
Group variants: Tailwind group-active:* / group-focus:* propagate parent interaction state through the C++ shadow tree with zero re-renders
Default styles: Experimental 1.2.0+ feature for styling default React Native components from CSS selectors like View { ... } and Text { ... }
Priority support: Don't let technical hurdles slow your team down
Package: "uniwind": "npm:uniwind-pro@latest" in package.json.
No code changes needed — props connect directly to C++ engine, eliminating re-renders automatically.
Group Variants
Tailwind group variants propagate parent interaction state to descendants through the C++ shadow tree. No re-renders, no context providers.
tsx
// Basic group — descendants react to parent press
<Pressable className="group p-4 bg-base rounded-xl">
<Text className="text-default group-active:text-primary">Press the card</Text>
<View className="size-8 bg-blue-500 rounded group-active:bg-red-500" />
</Pressable>
// Named groups — descendants pick which ancestor to follow
<Pressable className="group/card p-4 bg-base rounded-xl">
<Pressable className="group/button px-3 py-1 bg-primary rounded">
<Text className="text-white group-active/card:opacity-50 group-active/button:font-bold">
Nested groups
</Text>
</Pressable>
</Pressable>
Supported variants: group-active:* (press), group-focus:* (focus). Named variants: group-active/{name}:*, group-focus/{name}:*.
Supported group parents: Pressable (press + focus), Text (press — requires onPress, even empty). TouchableOpacity, TouchableHighlight, TouchableWithoutFeedback, and TextInput do not act as group parents — wrap in a Pressable marked group.
Not supported: group-hover:* (no pointer hover on native), group-disabled:* (parsed but no shadow tree trigger), arbitrary group-[.selector]:* variants, implicit in-* variants.
Default Styles (Pro 1.2.0+, Experimental)
Default styles let Pro users define baseline styles for built-in React Native components directly in CSS. They are disabled by default and require an experimental flag.
Effect: every View gets border-color: var(--color-primary), every Text gets font-family: Inter and font-size: 16px, unless more specific styles override them.
Rules:
Available only in Uniwind Pro 1.2.0+
Disabled by default; enable experimental.defaultStyles: true
Experimental; may not work for every use case and may change in future releases
Use React Native component names as selectors, not HTML tags
Treat as baseline styles; direct className styles can override them
Components inside React Suspense boundaries are handled correctly. While a subtree is suspended, Uniwind keeps the C++ shadow entries alive so theme updates and runtime changes (dark mode, orientation, etc.) still reach suspended nodes. When the tree unsuspends, styles are already up to date — no flash of stale theme.
Native Insets
Remove SafeAreaListener setup — insets injected from native layer:
tsx
// With Pro — just use safe area classes directly
<View className="pt-safe pb-safe">{/* content */}</View>
Theme Transitions (Pro)
Native animated transitions when switching themes. Supported on iOS, Android, and Web.
tsx
import { Uniwind, ThemeTransitionPreset } from 'uniwind';
// Fade transition
Uniwind.setTheme('dark', { preset: ThemeTransitionPreset.Fade });
// Slide transitions
Uniwind.setTheme('dark', { preset: ThemeTransitionPreset.SlideRightToLeft });
Uniwind.setTheme('light', { preset: ThemeTransitionPreset.SlideLeftToRight });
// Circle mask transitions (expand from a corner or center)
Uniwind.setTheme('ocean', { preset: ThemeTransitionPreset.CircleCenter });
// Blur transitions
Uniwind.setTheme('dark', { preset: ThemeTransitionPreset.Blur });
Uniwind.setTheme('dark', { preset: ThemeTransitionPreset.BlurRightToLeft });
// No animation
Uniwind.setTheme('light');
Available presets:
Preset
Effect
ThemeTransitionPreset.None
Instant switch, no animation
ThemeTransitionPreset.Fade
Crossfade between themes
ThemeTransitionPreset.SlideRightToLeft
Slide new theme in from right
ThemeTransitionPreset.SlideLeftToRight
Slide new theme in from left
ThemeTransitionPreset.CircleTopRight
Circle mask expanding from top-right
ThemeTransitionPreset.CircleTopLeft
Circle mask expanding from top-left
ThemeTransitionPreset.CircleBottomRight
Circle mask expanding from bottom-right
ThemeTransitionPreset.CircleBottomLeft
Circle mask expanding from bottom-left
ThemeTransitionPreset.CircleCenter
Circle mask expanding from center
ThemeTransitionPreset.Blur
Blur out animation
ThemeTransitionPreset.BlurRightToLeft
Directional blur from right to left
ThemeTransitionPreset.BlurLeftToRight
Directional blur from left to right
Setup Diagnostics
When styles aren't working, check in this order:
1. package.json
"uniwind" (or "uniwind-pro") in dependencies
"tailwindcss" at v4+ (^4.0.0)
For Pro: react-native-nitro-modules, react-native-reanimated, react-native-worklets
2. metro.config.js
withUniwindConfig imported from 'uniwind/metro'
withUniwindConfig is the outermost wrapper
cssEntryFile is a relative path string (e.g., './global.css')
No path.resolve() or absolute paths
For Pro default styles: experimental.defaultStyles: true is set
3. global.css
Contains @import 'tailwindcss'; AND @import 'uniwind';
Imported in App.tsx or root layout, NOT in index.ts/index.js
Location determines app root for Tailwind scanning
4. babel.config.js (Pro only)
'react-native-worklets/plugin' in plugins array
5. TypeScript
uniwind-types.d.ts exists (generated after running Metro)
Included in tsconfig.json or placed in src//app/ dir
6. Build
Metro server restarted after config changes
Metro cache cleared (npx expo start --clear or npx react-native start --reset-cache)
Native rebuild done (if Pro or after dependency changes)
Troubleshooting
Symptom
Cause
Fix
Styles not applying
Missing imports in global.css
Add @import 'tailwindcss'; @import 'uniwind';
Styles not applying
global.css imported in index.js
Move import to App.tsx or _layout.tsx
Classes not detected
global.css in nested dir, components elsewhere
Add @source '../components' in global.css
TypeScript errors on className
Missing types file
Run Metro to generate uniwind-types.d.ts
withUniwindConfig is not a function
Wrong import
Use require('uniwind/metro') not require('uniwind')
Hot reload full-reloads
global.css imported in wrong file
Move to App.tsx or root layout
cssEntryFile error / Metro crash
Absolute path used
Use relative: './global.css'
withUniwindConfig not outermost
Another wrapper wraps Uniwind
Swap order so Uniwind is outermost
Dark theme not working
Missing @variant dark
Define dark variant in @layer theme
Custom theme not appearing
Not registered in metro config
Add to extraThemes array, restart Metro
Fonts not loading
Font name mismatch
CSS font name must match file name exactly (no extension)
rem values too large/small
Wrong base rem
Set polyfills: { rem: 14 } for NativeWind compat
Unsupported CSS warning
Web-specific CSS used
Enable debug: true to identify; remove unsupported properties
Failed to serialize javascript object
Complex CSS, circular refs, or stale cache
Clear caches: watchman watch-del-all; rm -rf node_modules/.cache; npx expo start --clear. Also check if docs/markdown files containing CSS classes are in the scan path (see below)
Failed to serialize javascript object from llms-full.txt or docs
Docs/markdown files with CSS classes in project dir get scanned by Tailwind
Move .md files with CSS examples outside the project root, or add to .gitignore so Tailwind's scanner skips them
unstable_enablePackageExports conflict
App disables package exports
Use selective resolver for Uniwind and culori
Classes from monorepo package missing
Not included in Tailwind scan
Add @source '../../packages/ui' in global.css
Classes from node_modules library missing in production (bun)
Bun uses symlinks; Tailwind's Oxide scanner can't follow them
Use resolved path: @source "../../node_modules/heroui-native/lib" and add public-hoist-pattern[]=heroui-native to .npmrc
active: not working with withUniwind
withUniwind does NOT support interactive state selectors
Only core RN Pressable/TextInput/Switch support active:/focus:/disabled:. Third-party pressables wrapped with withUniwind won't get states
Where to put global.css in Expo Router?
Project root. Import in app/_layout.tsx. If placed in app/, add @source for sibling dirs.
Does Uniwind work with Expo Go?
Free: Yes. Pro: No — requires native rebuild (development builds).
Can I use tailwind.config.js?
No. Uniwind uses Tailwind v4 — all config via @theme in global.css.
How to access CSS variables in JS?
Inside components: useCSSVariable('--color-primary') (reactive). Outside React: Uniwind.getCSSVariable('--color-primary') (one-shot, 1.6.4+). For variables not used in classNames, define with @theme static.
Can I use Platform.select()?
Yes, but prefer platform selectors (ios:pt-12 android:pt-6) — cleaner, no imports.
Next.js support?
Not officially supported. Community plugin: uniwind-plugin-next. For Next.js, use standard Tailwind CSS.
Vite support?
Yes, since v1.2.0. Use uniwind/vite plugin alongside @tailwindcss/vite.
Full app reloads on CSS changes?
Metro can't hot-reload files with many providers. Move global.css import deeper in the component tree.
Style specificity?
Important utilities like bg-red-500! override non-important utilities for the same property and work with variants (active:bg-red-500!, ios:pt-12!). Inline style always overrides className, even important utilities. Use className for static styles, inline only for truly dynamic values. Use cn() from tailwind-merge for component libraries where classNames may conflict.
How do I include custom fonts?
Load font files (Expo: expo-font plugin in app.json; Bare RN: react-native-asset), then map in CSS: @theme { --font-sans: 'Roboto-Regular'; }. Font name must exactly match the file name. See the Fonts section above.
How can I style based on prop values?
Use data selectors: data-[selected=true]:ring-2. Only equality checks supported. See the Data Selectors section above.
How can I use gradients?
Built-in: bg-gradient-to-r from-red-500 to-green-500. Also supports angle-based (bg-linear-90) and arbitrary values (bg-linear-[45deg,#f00_0%,#00f_100%]). See the Gradients section above.
How does className deduplication work?
Uniwind does NOT auto-deduplicate conflicting classNames. Use tailwind-merge with a cn() utility. See the cn Utility section above.
How to debug 'Failed to serialize javascript object'?
Clear caches: watchman watch-del-all; rm -rf node_modules/.cache; npx expo start --clear. Enable debug: true in metro config to identify the problematic CSS pattern. See the Troubleshooting table above.
How do I enable safe area classNames?
Free: Install react-native-safe-area-context, wrap root with SafeAreaListener, call Uniwind.updateInsets(insets). Pro: Automatic — no setup. Then use pt-safe, pb-safe, etc. See the Safe Area Utilities section above.
What UI kits work well with Uniwind?React Native Reusables (shadcn philosophy, copy-paste components) and HeroUI Native (complete library, optimized for Uniwind). Any library works via withUniwind wrapper. See the UI Kit Compatibility section above.
Can I scope a theme to a single component?
Yes, use ScopedTheme: <ScopedTheme theme="dark"><Card /></ScopedTheme>. It forces a theme for the subtree without changing the global theme. See the Theming section.
Does active: work with react-native-gesture-handler Pressable?
No. withUniwind does NOT support interactive state selectors (active:, focus:, disabled:). Only core RN Pressable, TextInput, and Switch support them. For RNGH components, use onPressIn/onPressOut with state.
Can I customize the default border color?
Yes — use @utility border to override the class entirely:
This completely replaces the built-in border behavior, so re-declare any properties you still need. Alternatively, use border border-gray-300 explicitly or define --color-border in @theme and use border-border.
Can I use platform-specific fonts in @theme {}?
No. @theme {} only accepts custom properties. Use @layer theme { :root { @variant ios { --font-sans: '...'; } } } instead. Note: use @variant (not @media) for platform selection in CSS.
Does Uniwind work with ESM metro config (metro.config.mjs or metro.config.ts)?
Yes since v1.3.0+. If you hit Class extends value is not a constructor, update Uniwind or use CommonJS metro.config.js.
Classes from node_modules work in dev but not production (bun)?
Bun symlinks packages. Tailwind's Oxide scanner can't follow them. Use resolved @source paths and hoist the package. See UI Kit Compatibility for details.
How to clear all caches when debugging?watchman watch-del-all 2>/dev/null; rm -rf node_modules/.cache && npx expo start --clear. This clears Watchman, Babel/bundler caches, and Expo internal cache.
MCP Server
Uniwind provides an official MCP server for AI-assisted development. If the user's environment supports MCP, recommend setting it up: https://docs.uniwind.dev/mcp
Related Skills
NativeWind → Uniwind migration: Use the migrate-nativewind-to-uniwind skill for migrating from NativeWind. It handles package removal, config migration, Tailwind v4 upgrade, cssInterop removal, theme conversion, and all breaking changes. It is tested and production-ready.
IMPORTANT: Do NOT guess Uniwind APIs. If you are unsure about any Uniwind API, hook, component, or configuration option, fetch and verify against the official docs: https://docs.uniwind.dev/llms-full.txt
Uniwind next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.
Survey a whole React codebase as a senior React engineer, using React Doctor's scan as evidence, then produce a prioritized audit and self-contained implementation plans for other agents (or cheaper…
Uniwind — Tailwind CSS v4 styling for React Native. An agent skill from CherryHQ/cherry-studio-app. Uniwind is an agent skill from CherryHQ/cherry-studio-app. Uniwind — Tailwind CSS v4 styling for React Native.
When should I use Uniwind?
Uniwind fits situations like: styling components in a React Native project that uses Tailwind with className; tasks that involve Cross-platform mobile apps; tasks that involve CSS and styling.
How do I install Uniwind in Claude Code?
Run `npx skills add CherryHQ/cherry-studio-app --skill uniwind -a claude-code`. Or copy the skill folder (.agents/skills/uniwind in CherryHQ/cherry-studio-app) into .claude/skills/uniwind in your project. Claude Code loads it when a task matches its description.
How do I install Uniwind in Codex?
Run `npx skills add CherryHQ/cherry-studio-app --skill uniwind -a codex`. Or copy the skill folder (.agents/skills/uniwind in CherryHQ/cherry-studio-app) into .agents/skills/uniwind in your project. Codex loads it when a task matches its description.
Can I use Uniwind in Cursor, Gemini CLI or GitHub Copilot?
Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add CherryHQ/cherry-studio-app --skill uniwind -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/uniwind, .gemini/skills/uniwind, .github/skills/uniwind and .opencode/skills/uniwind in your project.
What does Uniwind need to run?
Going by SKILL.md and its folder, Uniwind needs the command-line tools its instructions call (npx, npm, bun and pnpm).
Does Uniwind access the network?
SKILL.md names 2 domains. As links in the text: docs.uniwind.dev and uniwind.dev. This is read from the text; nothing was executed.
Is Uniwind safe to install?
Our automated static check of SKILL.md flagged 2 warning(s): mentions a credentials file (ssh keys, cloud or package-manager tokens). Read the flagged lines before installing; the check is not a guarantee either way.
What licence does Uniwind use?
Uniwind is published under the AGPL-3.0 licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.
How many tokens does Uniwind use?
About 20k tokens (SKILL.md is roughly 81k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.
What are the alternatives to Uniwind?
Skills that share tags, products or a category with Uniwind: Weapp Tailwindcss Setup (weapp-tailwindcss/weapp-tailwindcss, 1.9k stars), Uniwind (Ohh-889/skyroc, 795 stars), Weapp Tailwindcss Lynx (weapp-tailwindcss/weapp-tailwindcss, 1.9k stars) and Weapp Tailwindcss React Native (weapp-tailwindcss/weapp-tailwindcss, 1.9k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.
Who maintains Uniwind?
CherryHQ (a GitHub organization) maintains it in CherryHQ/cherry-studio-app, which has 3,974 GitHub stars. The repository holds 13 skills in this directory. The repository was last updated on October 8, 2026.
Source: CherryHQ/cherry-studio-app on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.