A design system, not a styling dialect
Utility classes give you a vocabulary. Vajra gives you the components, the tokens and the theme, typed and ready to ship.
Nothing new to learn
Style with props: bg="primary", p="s-4", rounded="r-3". No class vocabulary to memorise, and every prop maps to a React Native style, so what you write is what renders on iOS and Android.
Components included
40+ components for real screens: Button, Input, Select, Modal, Sheet, Toast, Tabs, Accordion and more. Build each one once, with createRecipe for your own variants, instead of rebuilding the same button from class strings on every screen.
No build step
No Babel plugin, no Metro config, no CSS file, no compiler. Install the package, wrap your app in VajraProvider, and start building.
Fast, with proof
Level with twrnc on variant switches, 2.1โ2.5ร faster than NativeWind and 4โ8ร faster than Tamagui, in an open benchmark you can run yourself. See the numbers.
Typed end to end
Every token is a typed union, so bg="primry" fails at compile time with Did you mean "primary"? Your own tokens get the same autocomplete through module augmentation.
Your brand, live theming
Override colors, spacing, radii and fonts with createVajraTheme, and switch light and dark at runtime. Every component follows the theme, with nothing passed down by hand.
Headless core
Every styled component sits on unstyled primitives in @88khp/vajra-core. Use the design system, or drop down a level for full control.
Tested and previewed
Covered by Jest and React Native Testing Library, and every component in these docs renders live in your browser through react-native-web.
Free and MIT
Every component is MIT licensed and free to use in any project. There is no Pro tier and nothing behind a paywall.
Runtime tokens at hand-written speed
Benchmarked against six React Native styling libraries in one run, every one rendering the same card with identical output.
Every card changes variant, 12 times ยท median ms for 100 cards ยท lower is faster
- StyleSheet (hand-written)95 ms
- Vajra UI 3.0.0103 ms
- twrnc 4.16106 ms
- styled-components 6.6122.5 ms
- NativeWind 4.2257 ms
- Tamagui 3.1, runtime422.5 ms
- Tamagui 3.1, compiled445.5 ms
Two steps to your first screen
No Babel plugin, Metro config or CSS file to set up.
Install
npm install @88khp/vajra-ui @88khp/vajra-core react-native-safe-area-context
Wrap your app
import { VajraProvider } from '@88khp/vajra-ui';
export default function App() {
return (
<VajraProvider colorScheme="light">
<YourApp />
</VajraProvider>
);
}