A beautiful, accessible component library for React Native and Expo applications. Built with NativeWind (Tailwind CSS) and inspired by shadcn/ui.
- 🎨 Beautiful Components - Carefully crafted UI components
- ⚡ Fast Setup - Get started in minutes with the CLI
- 🎯 Type-Safe - Written in TypeScript
- 📱 Cross-Platform - Works on iOS, Android, and Web
- 🎨 Customizable - Tailwind-based styling system
- 🔧 CLI Tool - Easy component installation
# Clone the repository
git clone https://github.com/vanshpatelx/RN.git
cd RN/watermelon
# Build the CLI
pnpm install
pnpm --filter watermelon-cli build
# Link CLI globally
cd apps/cli
npm link# Navigate to your Expo project
cd your-expo-app
# Initialize Watermelon
watermelon initThis will:
- Create a
watermelon.jsonconfig file - Set up component directories
- Install required dependencies
- Create utility functions
# Add the button component
watermelon add button
# Add multiple components
watermelon add button textimport { Button } from '@/components/ui/button';
import { Text } from '@/components/ui/text';
export default function App() {
return (
<>
<Text variant="h1">Hello Watermelon!</Text>
<Button onPress={() => console.log('Pressed!')}>
Click Me
</Button>
</>
);
}- Button - Versatile button component with multiple variants
- Text - Typography component with semantic variants (h1-h4, p, etc.)
Initialize Watermelon in your project.
Options:
- Tailwind config path
- Global CSS path
- Component import alias
- Utils import alias
Add one or more components to your project.
Example:
watermelon add button
watermelon add button textThis will:
- Download component files from the registry
- Install required dependencies
- Transform imports to match your configuration
- Create component files in your project
watermelon/
├── apps/
│ ├── cli/ # CLI tool
│ ├── docs/ # Documentation site
│ └── showcase/ # Component showcase app
├── packages/
│ └── registry/ # Component registry
└── templates/
└── base/ # Test template
pnpm --filter watermelon-cli buildpnpm dev:showcase:web# Copy template to test directory
cp -r templates/base /tmp/watermelon-test
cd /tmp/watermelon-test
# Install dependencies
pnpm install
# Initialize and add components
watermelon init
watermelon add button
# Run the app
npx expo start --webContributions are welcome! Please feel free to submit a Pull Request.
MIT
Built with ❤️ using React Native, Expo, and NativeWind