Production-grade React Native design system with native-feeling components on iOS and Android.
Design tokens . Primitives . 50+ components . Dark mode . A11y-first . Zero-config theming
About . Quick Start . Components . Theming . Storybook . Development . License
@polprog/native-ui is a production-grade React Native component library and
design system. Components are tuned to the platform defaults of iOS and Android
so that any app built on top gets a native look and feel out of the box.
| Area | What you get |
|---|---|
| Tokens | Colours (light + dark + high-contrast), typography scale (SF Pro / Roboto), spacing (4-pt grid), radius, shadow, motion, haptics |
| Primitives | Box, VStack, HStack, Text, Heading, Divider, PressableScale |
| Components | Actions (Button, IconButton, ActionTile), form controls (Input, TextArea, Select, Checkbox, Radio, Switch, Chip, SearchBar, SegmentedControl, Slider, Stepper, PinInput, date pickers), feedback (Banner, Toast, Tooltip, Spinner, Skeleton, ProgressBar, EmptyState), overlays (Modal, BottomSheet, ActionSheet, InputPrompt), navigation and layout (HeaderBar, BottomTabBar, Tabs, Accordion, lists, sections). The full list is in the package README. |
| Theming | NativeUIProvider, colour presets, system dark mode, font-scale tiers, runtime config |
| Platforms | iOS and Android (React Native 0.84+). All components render and behave natively on both. |
| Output | ESM + CJS + .d.ts, tree-shakeable, zero runtime dependencies beyond peers |
npm install @polprog/native-ui react-native-reanimated react-native-safe-area-contextimport { NativeUIProvider, Button, VStack, Text } from '@polprog/native-ui';
export default function App() {
return (
<NativeUIProvider config={{ colorMode: 'system', preset: 'default' }}>
<VStack spacing="md" padding="lg">
<Text variant="largeTitle">Hello, native-ui</Text>
<Button onPress={() => {}}>Get started</Button>
</VStack>
</NativeUIProvider>
);
}Browse the full catalogue with live examples, accessibility notes, and code snippets in Storybook.
Every component reads from a single theme object resolved by NativeUIProvider.
Config is fully optional - defaults match the native platform on iOS 17 / Android 14.
<NativeUIProvider
config={{
colorMode: 'system', // 'light' | 'dark' | 'system'
preset: 'default', // 'default' | 'ocean' | 'forest' | 'sunset' | ...
fontScale: 'regular', // 'small' | 'regular' | 'large' | 'xlarge'
highContrast: false,
}}
>
<App />
</NativeUIProvider>Access the theme anywhere with hooks:
const { colors, spacing, typography } = useTheme();
const semantic = useSemantic(); // { background, surface, primary, ... }Storybook hosts the full component gallery, interactive controls, and design
token documentation. It auto-deploys to GitHub Pages on every push to master.
Live: https://polprog-tech.github.io/Native-UI
Run locally:
npm install
npm run storybookLibraries/Native-UI/
├── packages/
│ └── native-ui/ The published library (@polprog/native-ui)
│ ├── src/ Tokens, primitives, components, theme
│ ├── __tests__/ Jest + @testing-library/react-native
│ ├── stories/ Storybook stories (source of truth for docs)
│ └── docs/ ARCHITECTURE.md, RFC_TEMPLATE.md
├── apps/
│ ├── storybook/ Storybook host app (deploys to GitHub Pages)
│ └── example/ Expo app for checks on iOS and Android
├── .changeset/ Versioning + changelog automation
└── .github/workflows/ CI, release, deploy-storybook
Common tasks:
npm install # Bootstrap workspace
npm run typecheck --workspace=@polprog/native-ui # TypeScript strict
npm run lint --workspace=@polprog/native-ui # ESLint
npm run test --workspace=@polprog/native-ui # Jest
npm run build --workspace=@polprog/native-ui # tsup - ESM + CJS + d.ts
npm run storybook # Dev Storybook on :6006
npm run build-storybook # Static build
npm run ios --workspace=@polprog/example # Example app on an iOS simulatorReleases are automated via Changesets:
npx changeset # Describe the change (patch / minor / major)
git commit && git push # Open PR. On merge, release.yml publishes to npm with provenance.