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

@figkit/ui

v0.1.1

Published

React component library with design tokens and multi-brand/theme support

Downloads

162

Readme

@figkit/ui

React component library with design tokens and multi-brand/theme support.

Installation

npm install @figkit/ui
# or
pnpm add @figkit/ui
# or
yarn add @figkit/ui

Peer Dependencies

This package requires React 18+ or React 19+:

npm install react react-dom

Usage

Basic Setup

  1. Import the theme CSS:
import '@figkit/themes/tokens.css';
  1. Set the brand and theme attributes on your root element:
import { useEffect } from 'react';

function App() {
  useEffect(() => {
    document.documentElement.setAttribute('data-brand', 'default');
    document.documentElement.setAttribute('data-theme', 'light');
  }, []);

  return <YourApp />;
}
  1. Import and use components:
import { Button, Checkbox, Tabs } from '@figkit/ui';
import '@figkit/ui/index.css';

function MyComponent() {
  return (
    <div>
      <Button variant="primary" size="default">
        Click me
      </Button>
      <Checkbox label="Accept terms" />
      <Tabs
        items={[
          { label: 'Tab 1' },
          { label: 'Tab 2' },
        ]}
        defaultValue={0}
      />
    </div>
  );
}

Components

Button

import { Button } from '@figkit/ui';

<Button variant="primary" size="default">
  Button
</Button>

Variants: primary, secondary, figjam, destructive, secondary-destruct, inverse, success, link, link-danger, ghost

Sizes: default (24px), large (32px), wide (full width)

Props:

  • variant?: ButtonVariant
  • size?: ButtonSize
  • icon?: ReactNode
  • iconPosition?: 'left' | 'center'
  • disabled?: boolean
  • All standard button HTML attributes

Checkbox

import { Checkbox } from '@figkit/ui';

<Checkbox
  label="Accept terms"
  description="Please read and accept the terms"
  checked={checked}
  onChange={(e) => setChecked(e.target.checked)}
/>

Props:

  • label?: ReactNode
  • description?: ReactNode
  • checked?: boolean
  • indeterminate?: boolean
  • disabled?: boolean
  • muted?: boolean
  • ghost?: boolean
  • All standard checkbox HTML attributes

Tabs

import { Tabs } from '@figkit/ui';

<Tabs
  items={[
    { label: 'Tab 1', badge: '5' },
    { label: 'Tab 2' },
    { label: 'Tab 3', disabled: true },
  ]}
  value={selectedIndex}
  onChange={(index) => setSelectedIndex(index)}
/>

Props:

  • items: TabsItem[] - Array of tab items
  • value?: number - Controlled selected index
  • defaultValue?: number - Uncontrolled initial index
  • onChange?: (index: number) => void

Theming

The components support multiple brands and themes:

Brands: default, figjam, devmode, slides

Themes: light, dark

Switch themes dynamically:

document.documentElement.setAttribute('data-brand', 'figjam');
document.documentElement.setAttribute('data-theme', 'dark');

TypeScript

This package is written in TypeScript and includes type definitions:

import type { ButtonProps, ButtonVariant, ButtonSize } from '@figkit/ui';

License

ISC