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

@createnew/ui-react

v0.1.28

Published

CreateNew Design System - React UI Components

Downloads

1,420

Readme

@createnew/ui-react

React UI components for the CreateNew Design System.

Installation

npm install @createnew/ui-react @createnew/tokens

Note: lucide-react is automatically included. You can also use any other icon library if preferred.

Quick Start

1. Import Tokens

import "@createnew/tokens/tokens.css";

2. Import Component Styles

import "@createnew/ui-react/styles.css";

3. Use Components

import { Button, TextField, Select } from "@createnew/ui-react";

function App() {
  return (
    <div>
      <Button variant="primary">Click me</Button>
      <TextField label="Name" placeholder="Enter your name" />
    </div>
  );
}

Available Components

Actions

  • Button - Primary, secondary, outline, text variants with sizes (xs, sm, md, lg, icon)

Feedback

  • Loader - Round rotating loader with tail and border variants, configurable color, text, centered, and fullscreen variations

Forms

  • TextField - Text input with label and error support
  • NumberField - Numeric input with increment and decrement controls
  • Select - Dropdown select with label and error support
  • Checkbox - Checkbox with label, sizes (sm, md), and error support
  • Radio - Radio button with RadioGroup wrapper for grouped options

Overlays

  • Dialog - Modal dialog built on Radix Primitives

Navigation

  • TopNav - Top navigation component
  • SubNav - Sub-navigation component
  • Footer - Footer component

Component Examples

Button

import { Button } from "@createnew/ui-react";

// Variants
<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="outline">Outline</Button>
<Button variant="text">Text</Button>

// Sizes
<Button size="xs">Extra Small</Button>
<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>

// With icons (using lucide-react or any icon library)
import { Pencil, Trash2 } from "lucide-react";

<Button leftIcon={<Pencil size={16} />}>Edit</Button>
<Button size="icon" icon={Pencil} aria-label="Edit" />
<Button rightIcon={<Trash2 size={16} />}>Delete</Button>

// States
<Button loading>Loading</Button>
<Button disabled>Disabled</Button>

TextField

import { TextField } from "@createnew/ui-react";

<TextField
  label="Email"
  type="email"
  placeholder="[email protected]"
  error="Please enter a valid email"
/>

<TextField
  label="Budget"
  inputAdornments={{ prefix: "€" }}
  defaultValue="20"
  inputMode="decimal"
/>

<TextField
  label="Discount"
  inputAdornments={{ suffix: "%" }}
  defaultValue="15"
  inputMode="decimal"
/>

NumberField

import { NumberField } from "@createnew/ui-react";

<NumberField
  label="Quantity"
  min={1}
  max={40}
  defaultValue={10}
  helperText="Enter value between 1 and 40"
/>

<NumberField
  label="Budget"
  min={0}
  step={0.5}
  inputAdornments={{ prefix: "€" }}
  defaultValue={20}
/>

Select

import { Select } from "@createnew/ui-react";

<Select
  label="Company size"
  placeholder="Select company size"
  options={[
    { value: "1-10", label: "1-10 employees" },
    { value: "11-50", label: "11-50 employees" },
  ]}
/>

Checkbox

import { Checkbox } from "@createnew/ui-react";

<Checkbox
  label="I agree to the terms"
  checked={checked}
  onCheckedChange={setChecked}
/>

<Checkbox
  label="Partially selected"
  indeterminate
  onCheckedChange={setChecked}
/>

Radio Group

import { Radio, RadioGroup } from "@createnew/ui-react";

<RadioGroup
  name="payment"
  label="Payment method"
  value={value}
  onChange={setValue}
>
  <Radio value="card" label="Credit Card" />
  <Radio value="paypal" label="PayPal" />
</RadioGroup>

Dialog

import { Dialog, Button } from "@createnew/ui-react";

<Dialog
  open={open}
  onOpenChange={setOpen}
  trigger={<Button>Open Dialog</Button>}
  title="Dialog Title"
>
  <p>Dialog content goes here</p>
</Dialog>

TypeScript Support

All components are fully typed with complete IDE autocomplete support.

import type { ButtonProps, TextFieldProps } from "@createnew/ui-react";

function MyButton(props: ButtonProps) {
  return <Button {...props} />;
}

Styling

All components use token-based styling with global classnames prefixed with cn-:

  • .cn-button
  • .cn-textfield__input
  • .cn-select__field
  • .cn-checkbox__input
  • .cn-radio__input
  • .cn-dialog__overlay

Styles are 100% token-based using CSS custom properties from @createnew/tokens.

Documentation

For comprehensive documentation, architecture details, and complete examples, see the main README.

Dependencies

The following are automatically installed with @createnew/ui-react:

  • @createnew/tokens - Design tokens (required)
  • @radix-ui/* - All Radix UI primitives (required for Dialog, Select, Popover, Tooltip, etc.)
  • framer-motion - Animations (required for SubNav component)
  • lucide-react - Icon library (included for convenience, but you can use any icon library)

Peer Dependencies

These must be installed separately:

  • react ^18.0.0 (required)
  • react-dom ^18.0.0 (required)

About Icons:

  • lucide-react is automatically included and ready to use
  • The library accepts any icon component as props (e.g., icon={Pencil} or leftIcon={<Icon />})
  • You can use any icon library - components accept React components as props