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

@oge-ui/react-buttons

v0.13.0

Published

React buttons from the OGE UI suite: severity/styling variants, async single-flight actions, click guarding, badges, hold-to-confirm and auto-repeat gestures — sharing the Angular suite's press machine and design tokens.

Readme

@oge-ui/react-buttons

React buttons with semantic severities, design-token theming and interaction guards no other button ships out of the box — running the same framework-free press machine and the same stylesheet as the Angular @oge-ui/buttons package.

The OGE suite is one component engine with a native render layer per framework: nothing here wraps Angular, and the React layer is heading for full component and feature parity with the Angular suite, family by family.

Features

  • Variantsseverity: normal | accent | success | warning | danger × stylingMode: contained | outlined | text × size: sm | md | lg, all driven by --oge-* design tokens (dark, Bootstrap and Tailwind bridge themes work unchanged).
  • Async smart button — hand action a promise-returning function: the button turns on loading, disables itself, ignores re-clicks while pending (single-flight) and calls onActionDone / onActionFailed when it settles.
  • Click guardclickGuard throttles or debounces onClick; true is a ready-made 500 ms throttle for spam-sensitive submit buttons.
  • Hold-to-confirmholdToConfirm arms destructive actions behind an uninterrupted press with a CSS-only progress bar; Escape and pointer-cancel abort, Space/Enter holds work for keyboard users.
  • Auto-repeatautoRepeat re-fires while held (spinner/counter buttons) with configurable delay and interval.
  • Badge — number/string pills (capped at 99+, part of the accessible name) or a plain dot.
  • Button group<OgeButtonGroup> renders a segmented control with selectionMode: none | single | multiple, controlled (selectedKeys) or uncontrolled (defaultSelectedKeys) selection, WAI-ARIA toolbar/radiogroup/group semantics, roving tabindex and arrow-key navigation; children inherit the group's styling props.
  • Drop-down button<OgeDropDownButton> opens an anchored menu (@oge-ui/react-overlay: flip/clamp positioning, scroll repositioning, focus restore) with the full menu-button keyboard pattern incl. type-ahead. items accepts an array or a lazy promise-returning function (loading / empty / error rows, cached). splitButton adds an independent action main button; rememberLastAction turns the last picked item into the main button's label and action. Custom panel content via renderContent.
  • i18n — every user-facing string lives in OgeButtonsMessages (<OgeButtonsConfigProvider>), including screen-reader labels.

Installation

npm install @oge-ui/react-buttons

Requires React 18 or 19. @oge-ui/behavior (the shared interaction engine) comes along as a regular dependency. The components are client components — 'use client' ships in the published files, so they work from React Server Components without any wrapper.

Import the stylesheet once at your app entry — plus the overlay package's when you use the drop-down button (its panel chrome lives there):

import '@oge-ui/react-buttons/styles.css';
import '@oge-ui/react-overlay/styles.css'; // drop-down button panels

Quick start

'use client';

import { useState } from 'react';
import { OgeButton, OgeButtonGroup } from '@oge-ui/react-buttons';

export function Demo() {
  const [align, setAlign] = useState<readonly string[]>(['left']);
  const save = () => fetch('/api/save', { method: 'POST' });
  const remove = () => fetch('/api/item', { method: 'DELETE' });

  return (
    <>
      <OgeButton text="Save" severity="accent" action={save} />

      <OgeButton text="Delete" severity="danger" stylingMode="outlined" holdToConfirm={{ ms: 1000 }} onClick={() => remove()} />

      <OgeButtonGroup selectionMode="single" selectedKeys={align} onSelectionChange={({ selectedKeys }) => setAlign(selectedKeys)} ariaLabel="Alignment">
        <OgeButton value="left" text="Left" />
        <OgeButton value="center" text="Center" />
        <OgeButton value="right" text="Right" />
      </OgeButtonGroup>
    </>
  );
}

Docs

Live demos and the full API reference: https://ogeui.com/components/buttons (pick React in the header). Machine-readable docs for coding assistants ship inside the package at node_modules/@oge-ui/react-buttons/llms.txt.

License

MIT