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 🙏

© 2025 – Pkg Stats / Ryan Hefner

dialux

v0.0.3

Published

powerful and beautifully crafted React refined refined optimized polished enhanced refined improved polished polished optimized refined enhanced optimized enhanced optimized improved refined enhanced refined polished enhanced polished improved enhanced po

Readme

Dialux

An enhanced improved polished refined polished improved optimized improved optimized optimized refined optimized improved optimized optimized polished improved improved enhanced polished optimized enhanced refined polished refined improved refined polished optimized improved enhanced improved dialog component library for React built on top of Radix UI with multiple variants, modern styling, and smooth animations.

Features

  • 🎨 Modern Styling - Beautiful, polished components with dark mode support
  • 🚀 Multiple Variants - Standard dialogs, sheets, alerts, confirms, and stacked dialogs
  • Smooth Animations - Powered by Motion for fluid transitions
  • Accessible - Built on Radix UI primitives for full accessibility
  • 📦 TypeScript - Fully typed for better developer experience
  • 🎯 Flexible - Highly customizable with easy theming

Installation

npm install dialux
# or
pnpm add dialux
# or
yarn add dialux

Quick Start

Basic Dialog

import * as Dialog from "dialux";

function App() {
  return (
    <Dialog.Root>
      <Dialog.Trigger>Open Dialog</Dialog.Trigger>
      <Dialog.Portal>
        <Dialog.Overlay className="fixed inset-0 bg-black/50" />
        <Dialog.Content className="fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 rounded-lg bg-white p-6">
          <Dialog.Title>Dialog Title</Dialog.Title>
          <Dialog.Description>Dialog description goes here.</Dialog.Description>
          <Dialog.Close>Close</Dialog.Close>
        </Dialog.Content>
      </Dialog.Portal>
    </Dialog.Root>
  );
}

Sheet/Drawer

import * as Dialog from "dialux";

function App() {
  const [open, setOpen] = useState(false);

  return (
    <Dialog.Root open={open} onOpenChange={setOpen}>
      <Dialog.Trigger>Open Sheet</Dialog.Trigger>
      <Dialog.Portal>
        <Dialog.Overlay className="fixed inset-0 bg-black/50" />
        <Dialog.Sheet side="right" size="md">
          <div className="p-6">
            <Dialog.Title>Side Sheet</Dialog.Title>
            <Dialog.Description>Content goes here</Dialog.Description>
          </div>
        </Dialog.Sheet>
      </Dialog.Portal>
    </Dialog.Root>
  );
}

Alert Dialog

import * as Dialog from "dialux";

function App() {
  const [open, setOpen] = useState(false);

  return (
    <Dialog.Root open={open} onOpenChange={setOpen}>
      <Dialog.Trigger>Show Alert</Dialog.Trigger>
      <Dialog.Portal>
        <Dialog.Overlay className="fixed inset-0 bg-black/50" />
        <Dialog.Alert
          title="Confirm Action"
          description="Are you sure you want to proceed?"
          confirmText="Yes, proceed"
          cancelText="Cancel"
          onConfirm={() => console.log("Confirmed")}
          onCancel={() => setOpen(false)}
          variant="default"
        />
      </Dialog.Portal>
    </Dialog.Root>
  );
}

Stacked Dialogs

import * as Dialog from "dialux";

function App() {
  const [open, setOpen] = useState(false);

  const dialogs: Dialog.Props[] = [
    {
      id: "first",
      dialog: (
        <Dialog.StackContent className="rounded-lg bg-white p-6">
          <Dialog.StackTitle>First Dialog</Dialog.StackTitle>
          <Dialog.StackAdd dialogId="second">Next</Dialog.StackAdd>
        </Dialog.StackContent>
      ),
    },
    {
      id: "second",
      dialog: (
        <Dialog.StackContent className="rounded-lg bg-white p-6">
          <Dialog.StackTitle>Second Dialog</Dialog.StackTitle>
          <Dialog.StackRemove dialogId="second">Back</Dialog.StackRemove>
        </Dialog.StackContent>
      ),
    },
  ];

  return (
    <Dialog.Root open={open} onOpenChange={setOpen} dialogs={dialogs}>
      <Dialog.Trigger dialogId="first">Open Stack</Dialog.Trigger>
      <Dialog.Portal>
        <Dialog.Overlay className="fixed inset-0 bg-black/50" />
        <Dialog.Stack />
      </Dialog.Portal>
    </Dialog.Root>
  );
}

Components

Core Components

  • Root - Main dialog root component
  • Trigger - Button to trigger dialog
  • Portal - Portal wrapper for dialog content
  • Overlay - Backdrop overlay
  • Content - Main dialog content container
  • Title - Dialog title
  • Description - Dialog description
  • Close - Close button

Enhanced Components

  • Sheet - Side sheet/drawer component with configurable side and size
  • Alert - Alert dialog with confirm/cancel actions
  • Confirm - Confirmation dialog with optional icon
  • Stack - Stacked dialog container
  • StackContent - Content for stacked dialogs
  • StackTitle - Title for stacked dialogs
  • StackDescription - Description for stacked dialogs
  • StackAdd - Button to add/open next dialog in stack
  • StackRemove - Button to remove/close current dialog from stack
  • SharedItem - Shared element for smooth transitions

API Reference

Sheet Props

interface SheetProps {
  side?: "top" | "right" | "bottom" | "left";
  size?: "sm" | "md" | "lg" | "xl" | "full";
}

Alert Props

interface AlertProps {
  title: string;
  description?: string;
  confirmText?: string;
  cancelText?: string;
  onConfirm?: () => void;
  onCancel?: () => void;
  variant?: "default" | "destructive";
}

Styling

Dialux uses Tailwind CSS classes by default, but you can customize all styling through className props. All components accept standard HTML attributes and className props for complete styling control.

License

MIT