Loading...
Loading...
HeroUI Native component library for React Native (Tailwind v4 via Uniwind). Use when working with HeroUI Native components, installing HeroUI Native, customizing themes, or accessing component documentation. Keywords: HeroUI Native, heroui-native, React Native UI, Uniwind.
npx skill4agent add heroui-inc/heroui heroui-native| Feature | React (Web) | Native (Mobile) |
|---|---|---|
| Styling | Tailwind CSS v4 | Uniwind (Tailwind for React Native) |
| Colors | oklch format | HSL format |
| Package | | |
| Platform | Web browsers | iOS & Android |
// DO NOT DO THIS - React web pattern
import { Button } from "@heroui/react";
import "./styles.css"; // CSS files don't work in React Native
<Button className="bg-blue-500">Click me</Button>;// DO THIS - Native pattern (Uniwind, React Native components)
import { Button } from "heroui-native";
<Button variant="primary" onPress={() => console.log("Pressed!")}>
Click me
</Button>;primarysecondarytertiary# List all available components
node scripts/list_components.mjs
# Get component documentation (MDX)
node scripts/get_component_docs.mjs Button
node scripts/get_component_docs.mjs Button Card TextField
# Get theme variables
node scripts/get_theme.mjs
# Get non-component docs (guides, releases)
node scripts/get_docs.mjs /docs/native/getting-started/theminghttps://v3.heroui.com/docs/native/components/{component-name}.mdxhttps://v3.heroui.com/docs/native/components/button.mdxhttps://v3.heroui.com/docs/native/components/dialog.mdxhttps://v3.heroui.com/docs/native/components/text-field.mdxhttps://v3.heroui.com/docs/native/getting-started/{topic}.mdxnpm i heroui-nativenpm i react-native-reanimated react-native-gesture-handler react-native-safe-area-context @gorhom/bottom-sheet react-native-svg react-native-worklets tailwind-merge tailwind-variantsnpx create-expo-app MyApp
cd MyApp
npm i heroui-native uniwind tailwindcss
npm i react-native-reanimated react-native-gesture-handler react-native-safe-area-context @gorhom/bottom-sheet react-native-svg react-native-worklets tailwind-merge tailwind-variantsglobal.css@import "tailwindcss";
@import "uniwind";
@import "heroui-native/styles";
@source "./node_modules/heroui-native/lib";import { GestureHandlerRootView } from "react-native-gesture-handler";
import { HeroUINativeProvider } from "heroui-native";
import "./global.css";
export default function Layout() {
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<HeroUINativeProvider>
<App />
</HeroUINativeProvider>
</GestureHandlerRootView>
);
}HeroUINativeProviderGestureHandlerRootViewCard.HeaderCard.BodyonPressPlatform.OS<Card>
<Card.Header>
<Card.Title>Title</Card.Title>
<Card.Description>Description</Card.Description>
</Card.Header>
<Card.Body>{/* Content */}</Card.Body>
<Card.Footer>{/* Actions */}</Card.Footer>
</Card>Card.Header| Variant | Purpose | Usage |
|---|---|---|
| Main action to move forward | 1 per context |
| Alternative actions | Multiple |
| Dismissive actions (cancel, skip) | Sparingly |
| Destructive actions | When needed |
| Soft destructive actions | Less prominent |
| Low-emphasis actions | Minimal weight |
| Secondary actions | Bordered style |
global.css@theme {
--color-accent: hsl(260, 100%, 70%);
--color-accent-foreground: hsl(0, 0%, 100%);
}node scripts/get_theme.mjsimport { useThemeColor } from "heroui-native";
const accentColor = useThemeColor("accent");import { Uniwind, useUniwind } from "uniwind";
const { theme } = useUniwind();
Uniwind.setTheme(theme === "light" ? "dark" : "light");https://v3.heroui.com/docs/native/getting-started/theming.mdx