
Gluestack Ui V4
Implement React Native screens with gluestack-ui v4 compound components, icons, and provider setup instead of raw RN primitives.
Overview
gluestack-ui-v4 is an agent skill for the Build phase that enforces gluestack-ui v4 component patterns over React Native primitives.
Install
npx skills add https://github.com/gluestack/agent-skills --skill gluestack-ui-v4What is this skill?
- Rule 1: map View/Text/TouchableOpacity/ScrollView/Image/TextInput/FlatList to Gluestack Box, Text, Pressable, ScrollView
- Covers component selection, props vs className, compound patterns, icons, and provider setup
- Sub-skill focus: gluestack-ui v4 component usage patterns (frontmatter name gluestack-ui-v4:components)
- Import paths use @/components/ui/* project aliases
- Positions Gluestack as mandatory layer over direct react-native imports
- Rule 1 mapping table lists 7 React Native primitives with Gluestack equivalents
Adoption & trust: 583 installs on skills.sh; 1 GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your agent keeps importing react-native View and TextInput directly, breaking gluestack styling, tokens, and compound component conventions.
Who is it for?
Indie mobile or universal-app builders already on gluestack-ui v4 who want consistent agent-generated UI code.
Skip if: Web-only Next.js projects without React Native, or teams standardized on a different component library.
When should I use this skill?
Implementing or refactoring UI with gluestack-ui v4—component selection, compound patterns, icons, or provider setup.
What do I get? / Deliverables
New screens use @/components/ui imports with correct compound patterns, icons, and provider setup aligned to gluestack-ui v4.
- Screen code using Gluestack imports
- Provider-wrapped app shell guidance
- Compound Input/Field patterns
Recommended Skills
Journey fit
UI component discipline applies while product screens are actively built—canonical shelf is Build frontend for Expo/React Native apps using gluestack. Frontend subphase covers component selection, props vs className, and compound patterns—not backend APIs or ship-time perf audits alone.
How it compares
Design-system component skill for RN—not a generic Tailwind or shadcn web skill.
Common Questions / FAQ
Who is gluestack-ui-v4 for?
Solo builders and small teams on Expo/React Native using gluestack-ui v4 who want agents to follow the same import and compound rules as the docs.
When should I use gluestack-ui-v4?
During Build frontend work whenever you add screens, forms, lists, or icons and need Box/Pressable/Input patterns instead of raw React Native widgets.
Is gluestack-ui-v4 safe to install?
It is documentation-style guidance from gluestack/agent-skills; review the Security Audits panel on this Prism page before adding to your agent bundle.
SKILL.md
READMESKILL.md - Gluestack Ui V4
# Gluestack UI v4 - Component Patterns This sub-skill focuses on component usage, compound component patterns, icon handling, and provider setup for gluestack-ui v4. ## Rule 1: Gluestack Components Over React Native Primitives Always use Gluestack components instead of direct React Native imports: | React Native | Gluestack Equivalent | | ------------------------------------ | ---------------------------------------------- | | View from "react-native" | Box from "@/components/ui/box" | | Text from "react-native" | Text from "@/components/ui/text" | | TouchableOpacity from "react-native" | Pressable from "@/components/ui/pressable" | | ScrollView from "react-native" | ScrollView from "@/components/ui/scroll-view" | | Image from "react-native" | Image from "@/components/ui/image" | | TextInput from "react-native" | Input, InputField from "@/components/ui/input" | | FlatList from "react-native" | FlatList from "@/components/ui/flat-list" | ### Correct Pattern ```tsx import { Box } from "@/components/ui/box"; import { Text } from "@/components/ui/text"; import { Pressable } from "@/components/ui/pressable"; const Component = () => ( <Box className="p-4"> <Text className="text-foreground">Hello</Text> <Pressable onPress={handlePress}> <Text>Press Me</Text> </Pressable> </Box> ); ``` ### Incorrect Pattern ```tsx import { View, Text, TouchableOpacity } from "react-native"; const Component = () => ( <View style={{ padding: 16 }}> <Text style={{ color: "#333" }}>Hello</Text> <TouchableOpacity onPress={handlePress}> <Text>Press Me</Text> </TouchableOpacity> </View> ); ``` ### Exceptions - Platform-specific code where RN primitives are explicitly required - Deep integration with native modules - Performance-critical paths where wrapper overhead matters (rare, must document) ## Rule 2: Use Component Props Over className Utilities Always prefer component props over className utilities when a component provides built-in props. This ensures type safety, better maintainability, and consistent styling. ### Component Props vs className Many Gluestack components provide props that map to common styling needs. Use these props instead of className utilities: | Component | Use Prop Instead of className | Available Values | |-----------|------------------------------|-----------------| | `VStack` / `HStack` | `space` instead of `gap-*` | `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl` | | `Button` | `variant` instead of `bg-*` classes | `default`, `destructive`, `outline`, `secondary`, `ghost`, `link` | | `Button` | `size` instead of `px-* py-*` classes | `default`, `sm`, `lg`, `icon` | | `Heading` | `size` instead of `text-*` classes | `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, `5xl` | | `Text` | `size` instead of `text-*` classes | `2xs`, `xs`, `sm`, `md`, `lg`, `xl`, `2xl`, `3xl`, `4xl`, `5xl`, `6xl` | | `Heading` / `Text` | `bold` prop instead of `font-bold` | boolean | | `Heading` / `Text` | `isTruncated` prop instead of `truncate` | boolean | | `VStack` / `HStack` | `reversed` prop instead of `flex-*-reverse` | boolean | ### Correct Pattern: Using Component Props ```tsx // ✅ CORRECT: Using space prop instead of gap className <VStack space="lg"> <Box>Item 1</Box> <Box>Item 2</Box> </VStack> // ✅ CORRECT: Using Button variant and size props <Button variant="outline" size="lg"> <ButtonText>Click Me</ButtonText> </Button> // ✅ CORRECT: Using Heading size prop <Heading size="2xl" bold> Title </Heading> // ✅ CORRECT: Using Text size and bold props <Text size="sm" bold> Important text </Text> // ✅ CORRECT: Using HStac