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

@crosscode/gravity-components

v0.10.0

Published

A drop-in, fully themed admin UI kit built on Ant Design v6

Readme

Gravity Components

A drop-in, fully themed admin UI kit built on Ant Design v6. Install from npm, wrap your app with GravityProvider, and use Storybook-documented components with Gravity’s admin preset and token model.

Internal layout and chrome for several components use styled-components (a peer dependency). Toasts use Sonner via GravityToaster, mounted by default inside GravityProvider.

Installation

Peer dependencies (install these in your app; versions should satisfy the ranges below):

npm install @crosscode/gravity-components antd dayjs react react-dom sonner styled-components

Typical ranges (see package.json peerDependencies for the source of truth):

| Package | Range | | ------------------- | ------- | | antd | >=6 <7 | | react / react-dom | >=18 | | dayjs | >=1.11 | | sonner | >=2 <3 | | styled-components | >=6 |

If you use Ant Design icons in props (for example icon on Button), also install @ant-design/icons in your project.

Package exports

  • @crosscode/gravity-components — components, hooks, and theme helpers (GravityProvider, adminTheme, mergeTheme, tokens, etc.).
  • @crosscode/gravity-components/theme — the same theme surface only, for apps that want a lighter import path without pulling the full component bundle.

Quick start

import { GravityProvider, Button, Table } from '@crosscode/gravity-components'

function App() {
  return (
    <GravityProvider>
      <Button type="primary">Get started</Button>
    </GravityProvider>
  )
}

GravityProvider wraps Ant Design’s ConfigProvider with the admin theme, nests antd’s App (for static methods like Modal.confirm when needed), and mounts GravityToaster (Sonner) by default. To disable the toaster: <GravityProvider toaster={false}>.

Theme customization

Override tokens while keeping the admin preset:

import { GravityProvider } from '@crosscode/gravity-components'

<GravityProvider tokens={{ colorPrimary: '#7C3AED', borderRadius: 8 }}>
  <App />
</GravityProvider>

Or merge a full custom ThemeConfig:

import { GravityProvider, adminTheme, mergeTheme } from '@crosscode/gravity-components'

const myTheme = mergeTheme(adminTheme, {
  token: { colorPrimary: '#059669' },
  components: { Button: { borderRadius: 12 } },
})

<GravityProvider theme={myTheme}>
  <App />
</GravityProvider>

Token types and defaults are exported as GravityTokens and defaultTokens from the main entry (and from @crosscode/gravity-components/theme).

Components and APIs

Exported names match src/index.ts. Types are exported next to each component where applicable.

Primitives

| Area | Exports | | ----------- | ------- | | Actions | Button | | Inputs | Input, Password, Search, TextArea, InputNumber | | Pickers | Select, DatePicker, RangePicker | | Choices | Radio (Radio.Group, Radio.Button), Checkbox (Checkbox.Group), Switch | | Forms | Form, FormItem | | Overlays | Modal, Drawer | | Display | Tag, Badge | | Typography | Typography, Text, Title, Paragraph, Link |

Layout

| Exports | | ------- | | PageHeader, PageContainer |

Data display

| Exports | | ------- | | Table, Card, StatCard |

Feedback and messaging

| Exports | | ------- | | Alert, Empty, Spin, Skeleton | | useNotification, useMessage (Ant Design static helpers via App) | | GravityToaster, toast, useSonner (Sonner; themed under GravityProvider) |

Composites and enhanced

| Exports | Notes | | ------- | ----- | | AppShell, Sidebar | Application shell and sidebar navigation | | DataGrid | Table with search, toolbar, and pagination patterns | | Upload, Dragger | File upload wrappers |

Development

npm run storybook      # Storybook dev server (port 6006)
npm run build          # Library build: ESM + CJS + declarations (tsup)
npm test               # Vitest
npm run lint           # ESLint (`src/`)
npm run build-storybook # Static Storybook into `storybook-static/`

Releases to npm are automated with Changesets and GitHub Actions; see docs/publishing.md for the NPM_TOKEN secret and the version / publish flow.

Requirements

  • React 18 or newer (the repo is tested with React 19 in development).
  • Ant Design 6.x.
  • TypeScript is optional for consumers; the package ships .d.ts types.

License

MIT