npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@vajra-ui/core

v0.1.1

Published

Headless, zero-dependency React Native layout and primitive components

Readme

vajra-core

Headless React Native layout primitives. No theme. No opinions. Just structure.

Built to be consumed by vajra-ui or used standalone when you want layout building blocks without a design system attached.


Install

yarn add vajra-core

react and react-native are peer dependencies.


Primitives

Box

The foundation. A View with shorthand style props.

<Box w="100%" p={16} bg="#fff" rounded={8} direction="row" align="center" gap={8}>
  {children}
</Box>

Props: w, h, minW, maxW, minH, maxH, bg, borderColor, borderWidth, borderTopWidth, borderBottomWidth, borderLeftWidth, borderRightWidth, rounded, roundedT, roundedB, roundedL, roundedR, flex, gap, justify, align, direction, wrap, m, mx, my, mt, mb, ml, mr, p, px, py, pt, pb, pl, pr, position, top, bottom, left, right — plus all native ViewProps.


Row

Box with direction="row" preset.

<Row align="center" gap={12}>
  <Icon />
  <Label />
</Row>

Col

Box with direction="column" preset.

<Col gap={8} p={16}>
  <Title />
  <Subtitle />
</Col>

Center

Box with align="center" and justify="center" preset.

<Center flex={1}>
  <Spinner />
</Center>

AbsoluteCenter

Fills parent absolutely and centers its children.

<AbsoluteCenter>
  <Overlay />
</AbsoluteCenter>

Grid

Compound component for responsive grid layouts. Uses screen width to calculate column widths.

<Grid.Root gap={8} columns={2}>
  <Grid.Item span={1} columns={2} colGap={8} screenPadding={16}>
    <Card />
  </Grid.Item>
  <Grid.Item span={1} columns={2} colGap={8} screenPadding={16}>
    <Card />
  </Grid.Item>
</Grid.Root>

CoreText

Headless Text with typography shorthand props.

<CoreText fontSize={16} fontWeight="600" color="#111" lineHeight={24}>
  Hello
</CoreText>

Props: fontSize, lineHeight, fontWeight, fontFamily, letterSpacing, color, align, decoration, transform — plus all native TextProps.


CoreTextInput

Headless TextInput with box layout props and typography props.

<CoreTextInput
  p={12}
  rounded={8}
  borderWidth={1}
  borderColor="#ccc"
  fontSize={14}
  color="#000"
  placeholder="Type here..."
  placeholderColor="#aaa"
/>

CorePressable

Headless Pressable with box layout props and a built-in press opacity.

<CorePressable onPress={handlePress} bg="#000" rounded={8} p={12} opacity={0.6}>
  <CoreText color="#fff">Press me</CoreText>
</CorePressable>

opacity controls the pressed-state opacity (default 0.7).


Spacer

Fixed-size empty space.

<Spacer h={16} />
<Spacer w={8} />

Separator

A thin line divider.

<Separator orientation="horizontal" thickness={1} color="#e0e0e0" variant="solid" />
<Separator orientation="vertical" thickness={1} color="#e0e0e0" />

Hooks

useDimensions

Screen-aware dimension utilities. Useful for building responsive layouts.

const { width, height, contentWidth, getItemWidth } = useDimensions(screenPadding);

// width of one column in a 3-column grid with 8px gaps
const colWidth = getItemWidth(3, 8);

License

MIT