Vajra UI Core
2026 · personal · open source
Zero dependency headless layout primitives for React Native, the foundation Vajra UI is built on.

Vajra UI Core is a headless layout primitives package for React Native, published under my Devraj Labs org. It is around 9 kB, has zero runtime dependencies, and needs no provider.
The problem
Raw React Native layout is verbose. Design systems fix that but ship a theme, a provider and a dependency tree you did not ask for. Building layout by hand means wrapping View, Text and TouchableOpacity with the same flexbox boilerplate over and over.
What it gives you
A thin prop layer over the primitives you are already using:
// before
<View style={{ flexDirection: 'row', alignItems: 'center', paddingHorizontal: 16, gap: 8 }}>
// after
<Row align="center" px={16} gap={8}>
12 headless primitives that wrap the native View, Text and TouchableOpacity with shorthand props:
- Box. Foundation
Viewwith shorthand layout and spacing props. Every other layout primitive is built on top ofBox. - Row.
BoxwithflexDirection="row"pre applied, for horizontal layout. - Col.
BoxwithflexDirection="column"pre applied, stacks children vertically. - Center.
Boxcentered on both axes, no morealignItemsplusjustifyContentboilerplate. - AbsoluteCenter. Fills its parent absolutely and centers children, for overlays, loaders and empty states.
- Spacer. Fixed size gap between elements, dropped between siblings instead of reaching for margin.
- Separator. Horizontal or vertical divider line, one prop to switch orientation.
- CoreText. Headless
Textwith typography shorthand props, bring your own font and color system. - CoreTextInput. Headless
TextInputwith the same layout and typography props asCoreText. - CorePressable.
TouchableOpacitywith full layout prop support, style buttons without a wrapperView. - Grid. Compound responsive grid,
Grid.RootplusGrid.Item, adapts to any screen width automatically. - useDimensions. Screen aware dimension utilities, responsive values without a context provider.
Install
yarn add @devraj-labs/vajra-ui-core
react and react-native are peer dependencies. Nothing else is.
Examples
A runnable React Native CLI app ships in the repo's examples/app/ folder, the source of the screenshots below.
Built for Vajra UI
Core is the foundation Vajra UI, my token driven, themeable component library, is built on top of. Core works standalone for anyone who just wants the layout shorthand without theming.
Status
Published on npm at v2.3.0.
Install
npm install @devraj-labs/vajra-ui-core
Docs
devraj-labs.github.io/vajra-ui-core
Screenshots
