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

@ninna-ui/forms

v0.3.0

Published

17 accessible form React components for Ninna UI — Input, Select, Checkbox, Switch, Radio, Slider, FileUpload, PinInput, NumberInput, and more. Radix-powered, Tailwind CSS v4.

Readme

@ninna-ui/forms

17 accessible form components for Ninna-UI — inputs, selects, checkboxes, switches, radios, sliders, file uploads, and more.

npm License: MIT

📖 Full Documentation →  |  📦 npm →  |  🐙 GitHub →

Comprehensive form components for Ninna UI. Complex controls (Switch, Radio, Select, Slider) are powered by Radix UI under the hood for bulletproof accessibility — but Radix types never leak into the public API.

Every component supports forwardRef, className, data-slot CSS targeting, and integrates with the form infrastructure (FormControl, Field) for automatic label association, validation messages, and ARIA attributes.

Installation

pnpm add @ninna-ui/forms @ninna-ui/core

CSS Setup

@import "tailwindcss";
@import "@ninna-ui/core/theme/presets/default.css";

@variant dark (&:is(.dark *));

Components

Form Infrastructure

| Component | Description | |-----------|-------------| | FormControl | Context provider for label/message/input association | | FormLabel | Accessible label linked to its control | | FormMessage | Validation/helper message with error/success states | | Field | All-in-one: label + input + message in a single component | | FormGroup | Groups related form fields |

Simple Inputs

| Component | Description | Variants | Colors | |-----------|-------------|----------|--------| | Input | Text input field | outline, filled, flushed | 8 | | Textarea | Multi-line text input | outline, filled, flushed | 8 | | NumberInput | Numeric input with increment/decrement | outline, filled, flushed | 8 | | PinInput | PIN/OTP code input | outline, filled, flushed | 8 | | InputGroup / InputAddon | Input with prefix/suffix addons | — | — | | HiddenField | Hidden form input | — | — |

Radix-Powered Controls

| Component | Description | Variants | Colors | |-----------|-------------|----------|--------| | Switch | Toggle switch | outline, soft, solid | 8 | | RadioGroup / RadioCard | Radio selection with card variant | outline, soft, solid | 8 | | Select | Dropdown select with search | — | 8 | | Slider | Range slider with marks | outline, soft, solid | 8 |

Native Controls

| Component | Description | Variants | Colors | |-----------|-------------|----------|--------| | Checkbox / CheckboxGroup | Native checkbox with indeterminate support | outline, soft, solid | 8 |

Advanced

| Component | Description | |-----------|-------------| | FileUpload / FileUploadItem | Drag-and-drop file upload with validation |

Quick Start

import { Field, Input, Select, SelectItem, Checkbox, Switch } from "@ninna-ui/forms";
import { VStack } from "@ninna-ui/layout";
import { Button } from "@ninna-ui/primitives";

function SignupForm() {
  return (
    <form>
      <VStack gap="md">
        <Field label="Email" required>
          <Input type="email" placeholder="[email protected]" />
        </Field>

        <Field label="Role">
          <Select placeholder="Select a role">
            <SelectItem value="admin">Admin</SelectItem>
            <SelectItem value="user">User</SelectItem>
          </Select>
        </Field>

        <Checkbox color="primary">I agree to the terms</Checkbox>

        <Switch color="primary">Enable notifications</Switch>

        <Button type="submit" color="primary">Sign Up</Button>
      </VStack>
    </form>
  );
}

All Exports

import {
  // Form Infrastructure
  FormControl, useFormControl, useFormControlProps,
  FormLabel, FormMessage, Field, FormGroup,
  type FormControlProps, type FormLabelProps,
  type FormMessageProps, type FieldProps, type FormGroupProps,

  // Simple Inputs
  Input, type InputProps,
  Textarea, type TextareaProps,
  NumberInput, type NumberInputProps,
  PinInput, type PinInputProps,
  InputGroup, InputAddon, type InputGroupProps, type InputAddonProps,
  HiddenField, type HiddenFieldProps,

  // Native Controls
  Checkbox, CheckboxGroup, CheckboxGroupItem,
  type CheckboxProps, type CheckboxGroupProps,

  // Radix-Powered Controls
  Switch, type SwitchProps,
  RadioGroup, RadioGroupItem, RadioCard,
  type RadioGroupProps, type RadioGroupItemProps, type RadioCardProps,
  Select, SelectItem, SelectGroup, SelectSeparator,
  type SelectProps, type SelectItemProps,
  Slider, type SliderProps,

  // Advanced
  FileUpload, FileUploadItem,
  type FileUploadProps, type FileRejection,
} from "@ninna-ui/forms";

Accessibility

  • Radix-powered — Switch, Radio, Select, and Slider use Radix for WAI-ARIA compliance, keyboard navigation, and focus management
  • Native checkbox — Checkbox/CheckboxGroup use semantic native input behavior with explicit ARIA wiring
  • Form associationFormControl automatically links labels, inputs, and error messages via id/aria-describedby
  • Validationaria-invalid, aria-required, and aria-describedby wired automatically
  • Keyboard — Full keyboard navigation on all interactive controls

Related Packages

License

MIT