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

react-native-varia

v0.6.2

Published

A Component library based on **react-native-unistyles** that provides a CLI tool for React Native to effortlessly scaffold components, icons, styles, and layouts into your project.

Readme

React Native Varia

A Component library based on react-native-unistyles that provides a CLI tool for React Native to effortlessly scaffold components, icons, styles, and layouts into your project.


Installation

  1. Install the library as a development dependency:
yarn add -D react-native-varia

You also need to install react-native-unistyles

  1. Components dependencies

| Component | Dependencies | | ------------------ | ---------------------------------------------------------------------------- | | Badge | - | | Button | react-native-svg | | Checkbox | react-native-svg | | CircleProgress | react-native-reanimated, react-native-svg | | Field | - | | GradientBackground | react-native-svg | | GradientText | react-native-svg | | Input | - | | Link | - | | Modal | react-native-reanimated, @gorhom/portal, react-native-svg | | NumberInput | - | | RadioGroup | - | | ReText | react-native-reanimated | | Select | @gorhom/portal | | Slider | react-native-reanimated, react-native-gesture-handler, react-native-worklets | | Slideshow | react-native-reanimated, react-native-gesture-handler, react-native-worklets | | SlidingDrawer | react-native-reanimated, react-native-gesture-handler, react-native-worklets | | Spinner | - | | Switch | react-native-reanimated |

Install react-native-reanimated, react-native-worklets and react-native-gesture-handler.

Check the react-native-reanimated docs.

Check the react-native-gesture-handler docs.

Check the react-native-worklets docs.

Check the react-native-svg docs.

Check the react-native-portal docs.

Varia setup

Now you need to run:

npx varia setup

This will copy the mixins, types and utils files from lib into src/style/varia.

About ColorPalettes

React Native Varia uses a color palette system to provide a consistent color scheme for your app. It is based on Radix color palette system. Check the Radix Color Palettes for more information.

Check how to Compose a color palette for more information.

Varia has the same color palettes as Radix built-in. In the next section you will learn how to add them.

Creating your Theme

After setting up react-native unistyles theme, you will need to update it, to include the color palette system and default token needed for varia components.

In you src/style/themes.ts file, you will need to update it, to include the color palettes you will use:

import {tomato} from './varia/colorPalettes/tomato'
import {teal} from './varia/colorPalettes/teal'
import {slate} from './varia/colorPalettes/slate'
import {iris} from './varia/colorPalettes/iris'

Create a your preset with them, following how to Compose a color palette from radix you will set an accent and a gray color palette, and a red color palette is needed as well for default error styling in the components:

import {slate} from './varia/colorPalettes/slate'
import {iris} from './varia/colorPalettes/iris'
import {red} from './varia/colorPalettes/red'

export const colorPalettes = createPreset({
  accent: iris,
  gray: slate,
  red,
})

Beside those color palettes you can add more optional color palettes to your theme.

import {lime} from './varia/colorPalettes/lime'
import {olive} from './varia/colorPalettes/olive'
import {red} from './varia/colorPalettes/red'
import {yellow} from './varia/colorPalettes/yellow'
import {forest} from './varia/colorPalettes/forest'

export const colorPalettes = createPreset({
  accent: lime,
  gray: olive,
  red,
  yellow,
  forest,
})

Include de default theme tokens:

import {
  defaultColors,
  defaultFontSizes,
  defaultFontWeights,
  defaultRadii,
  defaultShadows,
  defaultSizes,
  defaultSpacing,
} from './varia/defaultTheme'

Create the base theme, here you can override the default tokens with whatever you want:

export const base = {
  colors: {
    ...defaultColors,
  },
  fontWeights: {
    ...defaultFontWeights,
  },
  sizes: {
    ...defaultSizes,
  },
  fontSizes: {
    ...defaultFontSizes,
  },
  spacing: {
    ...defaultSpacing,
  },
  radii: {
    ...defaultRadii,
  },
} as const

Get the shadows tokens:

const lightShadows = defaultShadows(colorPalettes.light)
const darkShadows = defaultShadows(colorPalettes.dark)

Ensamble the light and dark theme, you can add extend here with independent light and dark colors:

export const lightTheme = {
  colors: {
    ...base.colors,
    ...colorPalettes.light,
  },
  fontSizes: base.fontSizes,
  fontWeights: base.fontWeights,
  spacing: base.spacing,
  radii: base.radii,
  sizes: base.sizes,
  shadows: {
    ...lightShadows,
  },
} as const

export const darkTheme = {
  colors: {
    ...base.colors,
    ...colorPalettes.dark,
  },
  fontSizes: base.fontSizes,
  fontWeights: base.fontWeights,
  spacing: base.spacing,
  radii: base.radii,
  sizes: base.sizes,
  shadows: {
    ...darkShadows,
  },
} as const

⚙️ Available Commands

  1. Add varia command to package.json
"bin": {
    "varia": "./node_modules/new-varia-lib/bin/cli.js"
  }

Once installed, you can use the following commands via npx varia:

| Command | Description | | -------------------------------- | -------------------------------------------------------------------------------- | | npx varia setup | Adds the mixins, types and utils files from to src/style/varia. | | npx varia add <component_name> | Adds the specified component into your project src/components. | | npx varia add-icon <icon_name> | Copies the Icon.tsx template and renames it to the specified icon name. | | npx varia add-patterns | Copies the entire lib/patterns folder into src/patterns in your project. |