A beautiful, TypeScript-first React Native UI component library with support for both CLI and Expo workflows. Create stunning mobile experiences with our customizable and accessible components.
- π― TypeScript First: Built with TypeScript for better developer experience and type safety
- π± Cross Platform: Works seamlessly with both React Native CLI and Expo managed workflows
- π¨ Fully Customizable: Every component is fully customizable with theme support and style overrides
- β‘ Performance Optimized: Smooth animations with react-native-reanimated
- π§ Easy Integration: Simple installation and setup process
- π Comprehensive Documentation: Detailed docs with live examples and mobile previews
npm install nativekits react-native-reanimated
# or
yarn add nativekits react-native-reanimatedFor iOS, you'll also need to run:
cd ios && pod installnpx expo install nativekits react-native-reanimatedimport React from 'react';
import { View, Text } from 'react-native';
import { Accordion, AccordionItem } from 'nativekits';
const App = () => {
return (
<View style={{ flex: 1, padding: 16 }}>
<Accordion allowMultiple={true}>
<AccordionItem title="Getting Started">
<Text>Welcome to React Native UI Components!</Text>
</AccordionItem>
<AccordionItem title="Customization">
<Text>All components are fully customizable.</Text>
</AccordionItem>
<AccordionItem title="TypeScript Support">
<Text>Built with TypeScript for better DX.</Text>
</AccordionItem>
</Accordion>
</View>
);
};
export default App;react-native-ui-lib/
βββ π src/ # Source code
β βββ π components/ # UI Components
β β βββ π Accordion/ # Accordion component
β β βββ Accordion.tsx # Main Accordion component
β β βββ AccordionItem.tsx # Individual item component
β β βββ types.ts # TypeScript definitions
β β βββ index.ts # Component exports
β βββ π theme/ # Theme system
β β βββ index.ts # Default theme
β β βββ types.ts # Theme type definitions
β βββ index.ts # Main library exports
β
βββ π docs/ # Documentation website (Next.js)
β βββ π app/ # Next.js app directory
β β βββ globals.css # Global styles
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Homepage
β βββ π components/ # Doc components
β β βββ AccordionExample.tsx # Live accordion demo
β β βββ CodeBlock.tsx # Code syntax highlighting
β β βββ MobilePreview.tsx # Mobile device mockup
β βββ next.config.js # Next.js configuration
β βββ package.json # Docs dependencies
β βββ postcss.config.js # PostCSS config
β βββ tailwind.config.js # Tailwind CSS config
β βββ tsconfig.json # TypeScript config
β
βββ π lib/ # Compiled output (auto-generated)
βββ π node_modules/ # Dependencies
βββ .eslintrc.js # ESLint configuration
βββ .gitignore # Git ignore rules
βββ expo-module.config.json # Expo module config
βββ jest.config.js # Jest testing config
βββ jest.setup.js # Jest setup file
βββ metro.config.js # Metro bundler config
βββ package.json # Project dependencies
βββ react-native.config.js # RN CLI configuration
βββ README.md # This file
βββ tsconfig.json # TypeScript configuration
-
src/: Contains all the source code for the UI componentscomponents/: Individual UI components, each in their own foldertheme/: Theme system with colors, spacing, typography definitions
-
docs/: Next.js documentation website with live examplescomponents/: React components specific to the documentation siteapp/: Next.js 13+ app directory structure
-
lib/: Auto-generated compiled TypeScript output (created bynpm run build)
A collapsible content component perfect for FAQs, settings panels, and content organization.
| Prop | Type | Default | Description |
|---|---|---|---|
allowMultiple |
boolean |
false |
Allow multiple items to be expanded simultaneously |
defaultExpandedItems |
number[] |
[] |
Array of item indices to expand by default |
containerStyle |
ViewStyle |
undefined |
Custom styles for the accordion container |
itemSpacing |
number |
8 |
Spacing between accordion items |
| Prop | Type | Default | Description |
|---|---|---|---|
title |
string |
- | The title text for the accordion item |
titleStyle |
TextStyle |
undefined |
Custom styles for the title text |
containerStyle |
ViewStyle |
undefined |
Custom styles for the item container |
contentStyle |
ViewStyle |
undefined |
Custom styles for the content area |
iconColor |
string |
'#007AFF' |
Color of the expand/collapse icon |
animationDuration |
number |
300 |
Animation duration in milliseconds |
import { Accordion, AccordionItem, theme } from 'nativekits';
<Accordion
allowMultiple={false}
defaultExpandedItems={[0]}
containerStyle={{ padding: 16 }}
>
<AccordionItem
title="Custom Styled Section"
titleStyle={{
color: theme.colors.primary,
fontSize: 18
}}
iconColor={theme.colors.secondary}
>
<Text>Your content here...</Text>
</AccordionItem>
</Accordion>The library comes with a built-in theme system that you can customize:
import { theme } from 'nativekits';
// Access theme values
const primaryColor = theme.colors.primary;
const mediumSpacing = theme.spacing.md;
const largeBorderRadius = theme.borderRadius.lg;interface Theme {
colors: {
primary: string; // #007AFF
secondary: string; // #5856D6
background: string; // #FFFFFF
surface: string; // #F8F9FA
text: string; // #1C1C1E
textSecondary: string; // #6C6C70
border: string; // #E5E5EA
shadow: string; // rgba(0, 0, 0, 0.1)
};
spacing: {
xs: number; // 4
sm: number; // 8
md: number; // 16
lg: number; // 24
xl: number; // 32
};
borderRadius: {
sm: number; // 4
md: number; // 8
lg: number; // 12
};
typography: {
fontFamily: string;
fontSize: {
sm: number; // 12
md: number; // 14
lg: number; // 16
xl: number; // 18
};
fontWeight: {
normal: '400';
medium: '500';
semibold: '600';
bold: '700';
};
};
}Run tests with:
npm test
# or
yarn testRun tests with coverage:
npm run test:coverage
# or
yarn test:coverage- Clone the repository
- Install dependencies:
npm install - Start development:
npm run dev
npm run buildTo run the documentation site locally:
cd docs
npm install
npm run devVisit http://localhost:3000 to see the documentation.
- React Native: >= 0.60.0
- React: >= 16.8.0
- TypeScript: >= 4.0.0
- iOS: iOS 11.0+
- Android: API level 21+
This library is fully compatible with:
- Expo SDK 49+
- Expo Go app
- Development builds
- EAS Build
We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes
- Run tests:
npm test - Run linting:
npm run lint - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with React Native
- Animations powered by react-native-reanimated
- Documentation built with Next.js and Tailwind CSS
- π Documentation
- π Report Issues
- π¬ Discussions
Made with β€οΈ by thund3rhawk