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

@sio-group/ui-core

v0.4.3

Published

![npm](https://img.shields.io/npm/v/@sio-group/ui-core) ![TypeScript](https://img.shields.io/badge/types-Yes-brightgreen) [![License: ISC](https://img.shields.io/badge/License-ISC-blue.svg)](https://opensource.org/licenses/ISC)

Readme

@sio-group/ui-core

npm TypeScript License: ISC

A lightweight set of core UI components for React applications. The package provides reusable building blocks such as buttons, links and loading indicators that can be used across applications or higher-level UI libraries.

The components are designed to be:

  • Composable
  • Accessible
  • Framework-agnostic
  • Minimal and dependency-free

Features

  • 🎨 Reusable UI primitives – foundational components for design systems
  • Lightweight – minimal dependencies
  • 🧩 Composable – use icons, text, or custom content
  • Accessible – ARIA attributes and keyboard-friendly
  • 🔄 Loading states – built-in spinner support
  • 🎯 Flexible styling – customizable with CSS classes
  • 📦 TypeScript support – full type definitions included

Installation

npm install @sio-group/ui-core

Peer dependencies

This package requires:

  • react ^19.0.0
  • react-dom ^19.0.0

Styling

Import the core styles before using the components.

// All core styling (for best performance)
import "@sio-group/ui-core/sio-core-style.css";

// Styling per component
import "@sio-group/ui-core/sio-button.css";
import "@sio-group/ui-core/sio-link.css";
import "@sio-group/ui-core/sio-pill.css";

Core styles

sio-core-style.css contains:

  • base CSS variables
  • reset and base styles
  • shared utility styles

Component styles

Each component has its own stylesheet.

| File | Description | |------------------|----------------| | sio-button.css | Button styling | | sio-link.css | Link styling | | sio-pill.css | Pill styling |

This allows projects to import only the styles they need.


Color

The Color type is shared across all components that support color theming.

import { Color } from "@sio-group/ui-core";

type Color = 'default' | 'error' | 'success' | 'warning' | 'caution' | 'info';

| Value | Intent | |-----------|-------------------------------------| | default | Neutral, no semantic meaning | | error | Destructive or failed state | | success | Positive or completed state | | warning | Potentially problematic state | | caution | Requires attention, less severe | | info | Informational, no action required |

The color prop on Button, Link and Pill all use this type.


Components

This package currently includes:

  • Button
  • Link
  • Pill

Button

A flexible button component for user interaction.

Example

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

function Example() {
  return (
    <Button onClick={() => console.log("clicked")}>
      Save
    </Button>
  );
}

Loading state

<Button loading>
  Processing
</Button>

The button automatically becomes disabled while loading.


Button with icon

<Button>
  <Icon name="plus" />
  <span>Add item</span>
</Button>

Button variants

<Button variant="primary">Primary</Button>
<Button variant="secondary">Secondary</Button>
<Button variant="link">Link style</Button>

Button colors

<Button color="default">Default</Button>
<Button color="error">Delete</Button>
<Button color="success">Confirm</Button>
<Button color="warning">Warning</Button>
<Button color="caution">Caution</Button>
<Button color="info">Info</Button>

Button sizes

<Button size="sm">Small</Button>
<Button size="md">Medium</Button>
<Button size="lg">Large</Button>

Block button

<Button block>
  Full width button
</Button>

Button API

| Prop | Type | Default | Description | |-------------|-----------------------------------------------------------------------|-------------|-------------------------------------------| | type | "button" \| "submit" \| "reset" | "button" | Button type | | onClick | (event) => void | — | Click handler | | variant | "primary" \| "secondary" \| "link" | "primary" | Visual variant | | color | Color | "default" | Color theme | | size | "sm" \| "md" \| "lg" | "md" | Button size | | block | boolean | false | Full width button | | loading | boolean | false | Displays spinner and disables interaction | | disabled | boolean | false | Disables the button | | className | string | — | Additional CSS classes | | ariaLabel | string | — | Accessibility label | | style | React.CSSProperties | — | Inline styles | | children | ReactNode | — | Button content |


Link

A navigation component supporting both internal and external links.

The component can:

  • render normal links
  • open external URLs
  • integrate with custom navigation functions (e.g. routers)

Basic example

import { Link } from "@sio-group/ui-core";

<Link to="/dashboard">
  Dashboard
</Link>

External link

External links are automatically detected for URLs like:

  • http
  • https
  • mailto
  • tel
  • ftp
<Link to="https://example.com">
  Visit website
</Link>

You can also force it:

<Link to="https://example.com" external>
  Visit website
</Link>

Router navigation

Use a custom navigation function when integrating with a router.

<Link
  to="/settings"
  navigate={(to) => router.navigate(to)}
>
  Settings
</Link>

Loading state

<Link to="/profile" loading>
  Loading profile
</Link>

Link API

| Prop | Type | Default | Description | |-------------|------------------------|-------------|--------------------------------| | to | string | — | Target URL | | navigate | (to: string) => void | — | Optional navigation function | | external | boolean | false | Forces external link behaviour | | onClick | (event) => void | — | Click handler | | color | Color | "default" | Color theme | | size | "sm" \| "md" \| "lg" | "md" | Link size | | block | boolean | false | Full width link | | loading | boolean | false | Displays spinner | | disabled | boolean | false | Disables the link | | className | string | — | Additional CSS classes | | ariaLabel | string | — | Accessibility label | | style | React.CSSProperties | — | Inline styles | | children | ReactNode | — | Link content |


Pill

A compact status indicator for displaying the state or category of an item.

Example

import { Pill } from "@sio-group/ui-core";

function Example() {
  return <Pill status="success" label="Actief" />;
}

Pill colors

<Pill status="default" label="Onbekend" />
<Pill status="success" label="Actief" />
<Pill status="error"   label="Geblokkeerd" />
<Pill status="warning" label="Vervallen" />
<Pill status="caution" label="In behandeling" />
<Pill status="info"    label="Concept" />

Pill API

| Prop | Type | Default | Description | |----------|----------|---------|--------------------------------| | status | Color | — | Color variant of the pill | | label | string | — | Text displayed inside the pill |


Accessibility

The components include basic accessibility support:

  • aria-busy for loading states
  • aria-disabled for disabled elements
  • optional aria-label support
  • disabled links are removed from keyboard navigation (tabIndex=-1)

TypeScript

This package includes full TypeScript definitions.

import { Button, Link, Pill } from "@sio-group/ui-core";
import type { Color } from "@sio-group/ui-core";

Browser Support

Supports all modern browsers that support:

  • ES modules
  • React 19+

Contributing

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

License

This project is licensed under the ISC License - see the LICENSE file for details.