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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@unicorn-love/primitives

v0.0.4

Published

Foundation package with Tamagui config, design tokens, and base primitives for Unicorn UI

Readme

@unicorn-love/primitives

Foundation package with Tamagui config, design tokens, and base primitives for the Unicorn UI component system.

Installation

pnpm add @unicorn-love/primitives

Usage

Basic Setup

Wrap your application with TamaguiProvider and pass the config:

import { TamaguiProvider } from 'tamagui'
import { config } from '@unicorn-love/primitives'

function App() {
  return (
    <TamaguiProvider config={config}>
      <YourApp />
    </TamaguiProvider>
  )
}

Using Primitives

import { YStack, XStack, Text, Button, styled } from '@unicorn-love/primitives'

function MyComponent() {
  return (
    <YStack gap="$4" padding="$4">
      <Text>Hello World</Text>
      <XStack gap="$2">
        <Button>Primary</Button>
        <Button theme="gray">Secondary</Button>
      </XStack>
    </YStack>
  )
}

Using Design Tokens

import { spacing, fontSize, radius } from '@unicorn-love/primitives/tokens'

// Access individual tokens
console.log(spacing.md) // 16
console.log(fontSize.lg) // 18
console.log(radius.lg) // 16

Creating Custom Components

import { styled, YStack } from '@unicorn-love/primitives'

const Card = styled(YStack, {
  name: 'Card',
  backgroundColor: '$background',
  borderRadius: '$lg',
  padding: '$4',

  variants: {
    elevated: {
      true: {
        shadowColor: '$shadowColor',
        shadowRadius: 10,
        shadowOffset: { width: 0, height: 4 },
      },
    },
  } as const,
})

Exports

Main Exports (@unicorn-love/primitives)

  • Primitives: YStack, XStack, ZStack, Stack, Text, Paragraph, Heading, Button
  • Utilities: styled, Theme, useTheme, useMedia, AnimatePresence
  • Config: config, tamaguiConfig, createTamagui, TamaguiProvider

Tokens (@unicorn-love/primitives/tokens)

  • Colors: tealLight, tealDark, grayLight, grayDark, etc.
  • Spacing: space, spacing, negativeSpace
  • Typography: fonts, fontSize, fontWeight, lineHeight, textStyles
  • Shadows: lightShadows, darkShadows, shadowStyles, cardShadows
  • Radii: radii, radius, componentRadii
  • Sizes: sizes, size, zIndex

Theme (@unicorn-love/primitives/theme)

  • Animations: animations, animationDurations
  • Media: media, breakpoints, mediaQueryDefaultActive
  • Themes: themes

Design Philosophy

This package follows the MECE (Mutually Exclusive, Collectively Exhaustive) principle:

  1. Mutually Exclusive: Each token has a single purpose
  2. Collectively Exhaustive: All design needs are covered
  3. Universal: Works on both web and React Native

License

MIT