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

pico-survey

v1.0.0

Published

Pico Survey: a lightweight, flexible survey orchestration library for React

Readme

Pico Survey

A lightweight, flexible survey orchestration library for React applications.

Installation

npm install pico-survey
# or
yarn add pico-survey
# or
pnpm add pico-survey

Quick Start

import { PicoSurvey } from 'pico-survey';

const MySurvey = () => (
  <PicoSurvey
    config={{
      id: 'my-survey',
      pages: [<MyQuestion key="q1" id="q1" title="What's your name?" />],
    }}
    onComplete={(responses) => console.log('Done!', responses)}
  />
);

Package Scripts

Build & Development

  • yarn build - Build the library (runs type-check first)
  • yarn dev - Watch mode for library development
  • yarn build:example - Build the example app
  • yarn dev:example - Start example development server
  • yarn preview:example - Preview built example app

Testing

  • yarn test - Run library tests once
  • yarn test:watch - Run library tests in watch mode
  • yarn test:example - Run example app tests
  • yarn test:example:watch - Run example app tests in watch mode
  • yarn test:all - Run both library and example tests

Type Checking

  • yarn type-check - Type check the library
  • yarn type-check:example - Type check the example app

Code Quality

  • yarn format - Format code with Biome
  • yarn format:check - Check code formatting
  • yarn lint - Lint code with Biome
  • yarn lint:fix - Fix linting issues
  • yarn check - Format and lint (with fixes)
  • yarn check:ci - Format and lint check (CI mode)

Validation

  • yarn validate - Type check + code quality check (CI mode)
  • yarn validate:fix - Type check + code quality check (with fixes)

Analysis

  • yarn analyze - Full bundle analysis (build + size report)
  • yarn analyze:size - Show detailed bundle size report in terminal

Example App Scripts

The example/ directory contains a complete working implementation. Scripts:

  • yarn dev - Start development server
  • yarn build - Build for production
  • yarn preview - Preview production build
  • yarn test - Run tests
  • yarn test:watch - Run tests in watch mode
  • yarn type-check - Type check
  • yarn type-check:watch - Type check in watch mode
  • yarn type-check:strict - Type check with strict mode
  • yarn lint - Lint code
  • yarn lint:fix - Fix linting issues
  • yarn format - Format code
  • yarn format:check - Check formatting
  • yarn check - Type check + lint + format check
  • yarn check:fix - Fix linting and formatting

What's Included

  • Survey state management with Zustand
  • Navigation and branching logic
  • Progress tracking utilities
  • TypeScript definitions
  • No UI components - you build your own

Features

  • Lightweight (core library under 5KB gzipped)
  • Flexible question components
  • Conditional branching based on responses
  • Automatic localStorage persistence
  • Section-based progress tracking
  • Resume from last question
  • Mobile-first optimized

Philosophy

This library handles state, navigation, branching, and persistence. You handle UI, styling, and question components. This separation gives you complete control over the user experience.

Example Implementation

See example/ directory for a complete working survey with:

  • Question components (SingleSelect, MultiSelect, Interstitial)
  • UI components (SurveyContainer, ProgressBar)
  • Survey configurations
  • CSS Modules styling
  • Comprehensive tests

Run it: cd example && yarn dev

License

MIT