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

@ethereal-nexus/dialog-ui-shadcn

v1.4.1

Published

React UI package using shadcn UI components

Readme

Dialog UI Example with shadcn/ui

This package demonstrates how to extend the @ethereal-nexus/dialog-ui-core package with custom UI components using shadcn/ui. It provides a complete implementation of field renderers using modern React components built on top of Radix UI primitives.

Features

  • 🎨 shadcn/ui Components: Beautiful, accessible UI components
  • 🔧 Extensible Architecture: Extends the core dialog-ui package without modifications
  • 📚 Storybook Integration: Interactive documentation and testing
  • 🎯 Type Safety: Full TypeScript support with proper type definitions
  • 🎪 Multiple Field Types: Support for text, select, checkbox, switch, and multifield components

Quick Start

Installation

pnpm install

Development

Start the storybook development server:

pnpm storybook

Build the package:

pnpm build

Usage

Basic Implementation

import React, { useState } from 'react';
import { ShadcnFieldRenderer } from '@ethereal-nexus/dialog-ui-shadcn';
import type { FieldConfig } from '@ethereal-nexus/dialog-ui-core';

const MyForm = () => {
  const [value, setValue] = useState('');
  const renderer = new ShadcnFieldRenderer();

  const field: FieldConfig = {
    id: 'title',
    name: 'title',
    label: 'Article Title',
    type: 'textfield',
    required: true,
    placeholder: 'Enter title...',
  };

  return (
    <div>
      {renderer.render({
        field,
        value,
        onChange: setValue,
        error: null,
      })}
    </div>
  );
};

Extending the Renderer

You can create your own custom field renderer by extending the BaseFieldRenderer:

import { BaseFieldRenderer } from '@ethereal-nexus/dialog-ui-core';
import { ShadcnFieldRenderer } from '@ethereal-nexus/dialog-ui-shadcn';

class CustomFieldRenderer extends ShadcnFieldRenderer {
  renderCustomField(props: FieldRendererProps): React.ReactElement {
    // Your custom implementation
    return <div>Custom field implementation</div>;
  }

  render(props: FieldRendererProps): React.ReactElement {
    if (props.field.type === 'custom') {
      return this.renderCustomField(props);
    }
    return super.render(props);
  }
}

Supported Field Types

  • textfield: Single-line text input
  • select: Dropdown selection with options
  • checkbox: Boolean checkbox input
  • switch: Toggle switch for boolean values
  • multifield: Dynamic arrays of nested field groups

Architecture

This package demonstrates the power of the dialog-ui-core's extensible architecture:

  1. Core Logic: All field rendering logic is handled by @ethereal-nexus/dialog-ui-core
  2. UI Implementation: This package provides the visual components using shadcn/ui
  3. Separation of Concerns: Business logic and UI rendering are completely separated

Key Components

  • ShadcnFieldRenderer: Main renderer class extending BaseFieldRenderer
  • FieldRenderLogic: Utility functions from the core package for field manipulation
  • shadcn/ui components: Input, Select, Checkbox, Switch, Button, Label

Storybook Stories

The package includes comprehensive Storybook stories showcasing:

  • Individual field type examples
  • Complex multi-field forms
  • Error handling and validation
  • Real-time value updates

Styling

This package uses Tailwind CSS with shadcn/ui design tokens. The components support:

  • Light/dark mode via CSS variables
  • Customizable color schemes
  • Responsive design
  • Accessibility features

Dependencies

Core Dependencies

  • @ethereal-nexus/dialog-ui-core: Core field rendering logic
  • @radix-ui/*: Primitive components for accessibility
  • tailwindcss: Utility-first CSS framework
  • lucide-react: Icon library

Development Dependencies

  • @storybook/*: Interactive component documentation
  • vite: Build tool and development server
  • typescript: Type checking and compilation

Contributing

  1. Make sure all stories work correctly in Storybook
  2. Add tests for new field types
  3. Update this README with any new features
  4. Follow the existing code style and patterns

License

ISC