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

@axiora-ui/ui-core

v1.1.0

Published

Core React UI components for the Axiora UI design system.

Readme

@axiora-ui/ui-core

React UI components for the Axiora UI design system. Components are styled using design tokens from @axiora-ui/ui-tokens so they stay visually consistent with themes and are trivially customizable via the style prop.


Table of Contents


Installation

This package is part of the Axiora UI monorepo and is consumed via the workspace protocol:

"dependencies": {
  "@axiora-ui/ui-core": "workspace:*"
}

React 19 is a peer dependency — install it separately in your consuming app.


Usage

import { Button } from "@axiora-ui/ui-core";

function App() {
  return (
    <div>
      <Button variant="primary" onClick={() => console.log("clicked")}>
        Save
      </Button>
      <Button variant="secondary">Cancel</Button>
      <Button variant="danger">Delete</Button>
    </div>
  );
}

Components

Button

File: src/Button.tsx

A styled HTML button with three semantic variants. Extends the native HTMLButtonElement props, so every standard attribute (onClick, disabled, type, aria-*, etc.) works out of the box.

Import

import { Button } from "@axiora-ui/ui-core";
import type { ButtonProps, ButtonVariant } from "@axiora-ui/ui-core";

Props

| Prop | Type | Default | Description | | ---------- | ----------------------------------------- | ----------- | ---------------------------------------------------------- | | variant | "primary" \| "secondary" \| "danger" | "primary" | Visual style of the button | | style | React.CSSProperties | — | Additional inline styles (merged on top of variant styles) | | children | React.ReactNode | — | Button label content | | ...rest | ButtonHTMLAttributes<HTMLButtonElement> | — | All standard HTML button attributes |

Variants

| Variant | Background | Text | Use for | | ----------- | --------------------------------- | --------------------- | --------------------------- | | primary | colors.primary (#2563eb) | White | Main call-to-action | | secondary | colors.neutral[100] (#f1f5f9) | colors.neutral[900] | Secondary or cancel actions | | danger | colors.danger (#dc2626) | White | Destructive actions |

Base Styles

Applied to all variants regardless of which is chosen:

| Property | Token | Value | | -------------- | ------------------------------ | -------------------------------------- | | border | — | none | | borderRadius | spacing.sm | 0.5rem (8px) | | cursor | — | pointer | | fontFamily | typography.fontFamily.sans | system-ui, -apple-system, sans-serif | | fontSize | typography.fontSize.md | 1rem (16px) | | fontWeight | typography.fontWeight.medium | 500 | | padding | spacing.sm spacing.md | 0.5rem 1rem |

Examples

// Default primary button
<Button>Submit</Button>

// Secondary / cancel
<Button variant="secondary">Cancel</Button>

// Destructive action
<Button variant="danger" onClick={handleDelete}>
  Delete Account
</Button>

// Disabled state (standard HTML attribute)
<Button variant="primary" disabled>
  Processing...
</Button>

// Custom style override
<Button variant="primary" style={{ width: "100%" }}>
  Full Width
</Button>

// With click handler and aria label
<Button
  variant="primary"
  onClick={() => saveForm()}
  aria-label="Save changes"
>
  Save
</Button>

data-variant attribute

The rendered <button> element carries a data-variant attribute matching the active variant. This allows CSS selectors and testing queries to target specific button variants without inspecting inline styles:

/* In global CSS */
[data-variant="primary"]:hover {
  opacity: 0.9;
}
// In tests (e.g. Playwright / Testing Library)
screen.getByRole("button", { name: "Save" });
// or
document.querySelector('[data-variant="danger"]');

Types

type ButtonVariant = "primary" | "secondary" | "danger";

interface ButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
  variant?: ButtonVariant;
}

Planned Components

The following components are next in line for this package. Each will follow the same conventions as Button — typed props extending the native HTML element, inline token-based styles, and a Storybook story.

| Component | Description | | ---------------------- | --------------------------------------------------- | | Input | Text input with label, error state, and helper text | | Textarea | Multi-line text input | | Select | Dropdown select with controlled value | | Checkbox | Boolean toggle with label | | Radio / RadioGroup | Single-choice selection | | Switch | Toggle switch (binary state) | | Badge | Status label with color variants | | Tag / Chip | Dismissable label for filters and tags | | Avatar | User avatar with image and initials fallback | | Spinner | Loading indicator | | Tooltip | Hover tooltip | | Modal / Dialog | Accessible modal dialog | | Drawer | Side panel | | Card | Content container with surface styling | | Divider | Horizontal or vertical rule | | Alert | Feedback message with severity levels | | Toast | Non-blocking notification | | Table | Data table with sort and pagination | | Tabs | Tab navigation panel | | Accordion | Collapsible content section | | Breadcrumb | Navigation path indicator | | Pagination | Page navigation controls | | Progress | Linear and circular progress indicators | | Skeleton | Loading placeholder |


Build

# From the package directory
pnpm build

# From the monorepo root
pnpm build --filter @axiora-ui/ui-core

Output: dist/index.js (ESM) and dist/index.d.ts (type declarations).

react, react-dom, and @axiora-ui/ui-tokens are marked as --external in the build config and are not bundled into the output.