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

@nuralyui/common

v0.1.4

Published

Common UI components for Nuraly UI Library - includes basic building blocks like Icon, Badge, Divider, and Label

Readme

@nuralyui/common

Common UI components package for Nuraly UI Library. This package contains basic building blocks that are commonly used across the component library and in applications.

npm version License

🧩 Shared Utilities (what this package provides)

Mixins

Base mixins that provide common functionality to all Nuraly UI components:

  • NuralyUIBaseMixin / BaseMixin: Combined mixin with theme, dependency, and event handling
  • ThemeAwareMixin: Theme management and observation
  • DependencyValidationMixin: Component dependency validation
  • EventHandlerMixin: Enhanced event handling capabilities

Controllers

Reactive controllers for component behavior:

  • ThemeController: Theme observation and management
  • SharedDropdownController: Dropdown positioning and behavior

Theme Utilities

  • Theme detection and management
  • Theme variant types and utilities
  • getCurrentTheme, theme constants

Utility Functions

  • throttle, debounce, rafThrottle
  • Performance optimization helpers

Note: As of 0.1.x, @nuralyui/common no longer re-exports UI components (icon, badge, divider, label). Those should be consumed from their own packages or via the grouped packages like @nuralyui/forms or @nuralyui/layout.

🚀 Installation

npm install @nuralyui/common

Or using yarn:

yarn add @nuralyui/common

📖 Usage

Import Shared Utilities

// Import mixins for creating custom components
import { NuralyUIBaseMixin, ThemeAwareMixin } from '@nuralyui/common/mixins';

// Import controllers
import { ThemeController, SharedDropdownController } from '@nuralyui/common/controllers';

// Import theme utilities
import { getCurrentTheme, type ThemeVariant } from '@nuralyui/common/themes';

// Import utility functions
import { throttle, debounce, rafThrottle } from '@nuralyui/common/utils';

Creating Custom Components with Mixins

import { LitElement, html } from 'lit';
import { customElement } from 'lit/decorators.js';
import { NuralyUIBaseMixin } from '@nuralyui/common/mixins';

@customElement('my-component')
export class MyComponent extends NuralyUIBaseMixin(LitElement) {
  render() {
    return html`
      <div data-theme="${this.currentTheme}">
        My themed component
      </div>
    `;
  }
}

Using Controllers

import { LitElement, html } from 'lit';
import { ThemeController } from '@nuralyui/common/controllers';

export class MyComponent extends LitElement {
  private themeController = new ThemeController(this);

  render() {
    return html`
      <div class="${this.themeController.isDark ? 'dark' : 'light'}">
        Theme: ${this.themeController.currentTheme}
      </div>
    `;
  }
}

HTML Usage (utilities only)

Utilities don’t render by themselves. Use them inside your own components or with the grouped/component packages.

🎯 Why Use @nuralyui/common?

Guidance

  • Install components from their own packages (e.g., @nuralyui/icon) or grouped packages (@nuralyui/forms, @nuralyui/layout).
  • Use @nuralyui/common for mixins, controllers, themes, and utilities.

📚 Component Documentation

For component docs, see the individual packages or grouped packages:

🔗 Related Packages

  • @nuralyui/themes - Theme packages for Nuraly UI
  • Individual component packages available on npm under @nuralyui/*

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

📄 License

BSD-3-Clause © Laabidi Aymen

🔗 Links