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

@arshad-shah/cynosure-core

v2.1.1

Published

Cynosure UI — primitives, utilities, hooks

Downloads

249

Readme

@arshad-shah/cynosure-core

Headless primitives, hooks, and utilities that underpin Cynosure UI.

Most application developers want @arshad-shah/cynosure-react instead — it's the batteries-included component library. This package is the substrate it sits on: low-level building blocks meant for library authors, advanced consumers, and anyone assembling their own components on top of Cynosure's behaviour layer.

Explore the full component library, live: cynosure.arshadshah.com


Install

pnpm add @arshad-shah/cynosure-core

Peer requirements: react >= 18, react-dom >= 18.


What's inside

  • HooksuseId, useMergedRef, useControllableState, focus-trap utilities, keyboard-nav helpers
  • Utilities — DOM owner-document resolution, polymorphic as typings, SSR-safe helpers
  • Primitives — unstyled behaviour wrappers that the react package composes into themed components
  • Types — the shared TypeScript vocabulary the rest of Cynosure's packages reference

Every export is a single-purpose building block. None of them render visible UI on their own.


Usage

import { useMergedRef, useControllableState } from '@arshad-shah/cynosure-core';

function MyInput({ value, defaultValue, onValueChange, ...props }) {
  const [controlledValue, setControlledValue] = useControllableState({
    prop: value,
    defaultProp: defaultValue,
    onChange: onValueChange,
  });
  // …
}

Because the package has no styles, nothing is imported implicitly. There are no side effects at module load outside of the CSS files consumers explicitly opt into via subpath imports.


When to use this directly

  • You're building a component library that wants Cynosure's behaviour layer without its styling decisions
  • You need a Cynosure hook in a component that isn't wrapped in @arshad-shah/cynosure-react
  • You're writing a custom theme or token pipeline and want to reuse the type vocabulary

If none of those apply, you probably want @arshad-shah/cynosure-react.


Links

License

MIT © Arshad Shah