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

@js-empire/emperor-ui

v1.3.5

Published

They provide the atoms, we provide the empire.

Readme


Introduction

Emperor UI is a modular React component library built for modern web applications. It sits on top of HeroUI to deliver ready-made organisms and page-level building blocks—so you can ship features faster without rebuilding common patterns from scratch.

Every component is designed with full control in mind: optional features can be enabled or disabled via props, and styling is customizable through className and classNames for fine-grained overrides.

Ideal for React and Next.js projects that use Tailwind CSS and HeroUI.


Installation

Install the package from npm:

npm install @js-empire/emperor-ui

Or with yarn:

yarn add @js-empire/emperor-ui

Or with pnpm:

pnpm add @js-empire/emperor-ui

Peer dependencies

Emperor UI depends on React, HeroUI, Tailwind CSS, and related tooling. Ensure your project has compatible versions. For theme switching, next-themes is used.

Styles

Import the library’s global styles in your app root (e.g. layout.tsx or _app.tsx):

import "@js-empire/emperor-ui/globals.css";

Components

Components are grouped by complexity: Atoms (small building blocks), Molecules (combinations of atoms), Organisms (sections and features), and Templates (full page layouts).


Atoms

| Component | Description | | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Brand | Logo and brand mark for headers and sidebars. | | ColorPicker | Color selection with preset or free (input) modes. Use inputType="preset" for predefined colors. | | Container | Centered layout wrapper with consistent padding. | | Column | Flex column layout primitive. | | Row | Flex row layout primitive. | | CopyButton | Button that copies a given string to the clipboard and shows copy/success state. Pass value to copy. | | Field | Form field / sorter wrapper. | | Filter | Single filter unit. Types: search, select, autocomplete, date, numeric, checkbox, checkboxGroup, switch, range. Use with paramKey and type-specific props. | | Portal | Renders children into a DOM node (e.g. modals, tooltips). | | ThemeSwitch | Toggle between light and dark theme (works with next-themes). | | Uploader | File upload with label, listing, and optional avatar mode. Use with useUpload and pass the returned props. |

Example — Theme switch

import { ThemeSwitch } from "@js-empire/emperor-ui";

<ThemeSwitch />;

Example — Copy button

import { CopyButton } from "@js-empire/emperor-ui";

<CopyButton value="Text to copy" />;

Example — Filter

import { Filter } from "@js-empire/emperor-ui";

<Filter
  type="search"
  paramKey="q"
  searchProps={{ placeholder: "Search..." }}
/>;

Example — Uploader

import { Uploader, useUpload } from "@js-empire/emperor-ui";

const uploadProps = useUpload({
  labelId: "uploaded-file",
  fileTypes: ["image", "pdf"],
  isRequired: true,
  isMulti: true,
});

<Uploader {...uploadProps} />;

Molecules

| Component | Description | | ------------ | ----------------------------------------------------------------------------------------------------------------------------- | | ItemCard | Card for list/grid items: header, body, footer, optional actions and hover effects. Supports vertical/horizontal orientation. | | NavBar | Horizontal navigation with items and optional hover effects. | | Scaffold | Main content wrapper; respects Emperor UI config (e.g. dir for RTL). | | SideBar | Collapsible sidebar with drawer on mobile; use with header, items, and trigger. |

Example — Item card

import { ItemCard } from "@js-empire/emperor-ui";

<ItemCard
  item={{ key: "1", title: "Item", subtitle: "Description" }}
  orientation="vertical"
  actions={[{ key: "edit", label: "Edit" }]}
  onActionClick={(key) => console.log(key)}
/>;

Example — Scaffold

import { Scaffold } from "@js-empire/emperor-ui";

<Scaffold>
  <YourPageContent />
</Scaffold>;

Organisms

| Component | Description | | --------------- | ----------------------------------------------------------------------------------------------- | | Filters | Container for multiple Filter components. Children must be Filter only. | | Footer | Site footer with quick links, social links, policies, and copyright. | | Header | App header with sidebar (drawer on mobile), nav bar, and optional glass effect. | | ItemDetails | Details view block (e.g. breadcrumbs, media, title, price). | | Listings | Grid or list of items with ItemCard, loading skeletons, empty state, and optional pagination. |

Example — Filters

import { Filters, Filter } from "@js-empire/emperor-ui";

<Filters>
  <Filter type="search" paramKey="q" />
  <Filter type="select" paramKey="category" options={[...]} />
</Filters>

Example — Listings

import { Listings } from "@js-empire/emperor-ui";

<Listings
  items={items}
  layout="grid"
  isLoading={isLoading}
  pagination={{ page: 1, total: 10, pageSize: 12 }}
/>;

Example — Header

import { Header } from "@js-empire/emperor-ui";

<Header variant="default" glassEffect />;

Templates

| Component | Description | | --------------- | --------------------------------------------------------------- | | LandingPage | Full landing page layout composing header, content, and footer. |


Documentation & development

  • Storybook — Run npm run storybook to browse and test components locally.
  • IssuesGitHub Issues
  • RepositoryGitHub

Author

JS Empire — Mustafa Alhasanat