A truly cross-platform multi-design UI component library that works seamlessly across React, Next.js, React Native, and any React-based framework.
🎯 Framework Agnostic - Works with React, Next.js, React Native, Remix, Gatsby, and more
🎨 5 Design Systems - Flat, Neumorphic, Glassmorphic, Skeuomorphic, Retro
📱 Platform Detection - Automatically adapts to web, mobile, and desktop
🔧 Zero Config - No platform-specific setup required
⚡ Performance First - Tree-shakeable with minimal bundle impact
🧩 30+ Components - Complete UI component ecosystem
npm install @productshiv/baapui
# or
yarn add @productshiv/baapui
# or
pnpm add @productshiv/baapui
import React from 'react';
import { Button, Input, Card, ThemeProvider } from '@productshiv/baapui';
function App() {
return (
<ThemeProvider>
<Card>
<Input label="Email" placeholder="Enter email" />
<Button variant="primary">Submit</Button>
</Card>
</ThemeProvider>
);
}
That's it! The same code works in React, Next.js, React Native, and more.
import { Button, ThemeProvider } from '@productshiv/baapui';
function MyReactApp() {
return (
<ThemeProvider>
<Button>Click me!</Button>
</ThemeProvider>
);
}
// pages/index.tsx
import { Button, Card, ThemeProvider } from '@productshiv/baapui';
export default function Home() {
return (
<ThemeProvider>
<Card>
<Button>Server-rendered button!</Button>
</Card>
</ThemeProvider>
);
}
import { Button, View, ThemeProvider } from '@productshiv/baapui';
export default function App() {
return (
<ThemeProvider>
<View>
<Button>Native button!</Button>
</View>
</ThemeProvider>
);
}
// Works with Expo out of the box
import { Button, ThemeProvider } from '@productshiv/baapui';
export default function App() {
return (
<ThemeProvider>
<Button>Expo button!</Button>
</ThemeProvider>
);
}
BaapUI supports 5 different design systems that can be switched dynamically:
<Button design="flat">Flat Button</Button>
<Button design="neumorphic">Soft UI Button</Button>
<Input design="neumorphic" placeholder="Soft input" />
<Button design="glassmorphic">Glass Button</Button>
<Button design="skeuomorphic">Realistic Button</Button>
<Button design="retro">Vintage Button</Button>
- Button - Primary, secondary, outline, text variants
- Input - Text input with validation
- TextArea - Multi-line text input
- Checkbox - Single/multiple selection
- RadioButton - Single selection from group
- ToggleSwitch - On/off toggle
- Slider - Range selection
- Dropdown - Select from options
- Stepper - Increment/decrement values
- Breadcrumbs - Navigation hierarchy
- Tabs - Tab navigation
- Pagination - Page navigation
- Drawer - Side navigation
- Accordion - Expandable sections
- Card - Content container
- Grid - Layout system
- Divider - Section separator
- BaapSafeArea - Safe area wrapper
- Toast - Temporary notifications
- Modal - Overlay dialogs
- Tooltip - Contextual help
- Spinner - Loading indicator
- ProgressBar - Progress indicator
- SkeletonLoader - Loading placeholder
- Table - Data tables
- List - Item lists
- Badge - Status indicators
- Chip - Compact elements
- Avatar - User representation
- Typography - Text styling
- Carousel - Image/content slider
Wrap your app with ThemeProvider
to enable theming:
import { ThemeProvider } from '@productshiv/baapui';
<ThemeProvider>
<YourApp />
</ThemeProvider>;
import { PlatformInfo } from '@productshiv/baapui';
console.log(PlatformInfo);
// {
// isReactNative: false,
// isWeb: true,
// OS: 'web'
// }
All components support standard props plus design system variants:
<Button
variant="primary"
size="medium"
design="neumorphic"
disabled={false}
loading={false}
onPress={() => console.log('Pressed!')}
>
Click me
</Button>
No additional setup required! Just install and use.
Works with SSR out of the box. For better performance, add to next.config.js
:
module.exports = {
transpilePackages: ['@productshiv/baapui'],
};
For React Native projects, ensure you have these peer dependencies:
npm install react-native react-native-svg
Works directly with Expo. No additional setup needed.
import { ThemeProvider, createTheme } from '@productshiv/baapui';
const customTheme = createTheme({
colors: {
primary: '#your-color',
secondary: '#your-secondary',
},
spacing: {
sm: 8,
md: 16,
lg: 24,
},
});
<ThemeProvider theme={customTheme}>
<YourApp />
</ThemeProvider>;
import { useTheme } from '@productshiv/baapui';
function ThemeSwitcher() {
const { setDesign } = useTheme();
return (
<div>
<button onClick={() => setDesign('flat')}>Flat</button>
<button onClick={() => setDesign('neumorphic')}>Neumorphic</button>
</div>
);
}
BaapUI is designed for optimal bundle size:
- Core: ~15KB gzipped
- Individual Components: ~2-5KB each
- Tree Shakeable: Import only what you use
- Zero Dependencies: No external runtime dependencies
// Import only what you need
import { Button, Input } from '@productshiv/baapui';
We welcome contributions! Please see our Contributing Guide for details.
git clone https://github.com/productshiv/baapui.git
cd baapui
npm install
npm run dev
npm run storybook
MIT © Shivam Srivastava
Made with ❤️ for the React ecosystem