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

@tcn/ui-datum

v3.0.6

Published

TCN UI Datum Component Library

Readme

@tcn/ui-datum

A collection of data display components including badges, chips, and bubbles for presenting information in a clear, visually appealing way in React applications.

Overview

@tcn/ui-datum provides essential components for displaying data, status information, and metadata in your user interface. These components help users quickly understand information through consistent visual patterns and clear data representation.

What's Included

Data Display Components

  • Badge: Notification badges that overlay content with counts or status indicators
  • Chip: Compact data chips for tags, categories, and selectable items
  • Bubble: Flexible containers for highlighting and displaying information

Display Features

  • Status Indicators: Visual representation of data states and values
  • Information Overlays: Badges that provide context without disrupting layout
  • Data Tags: Chips for categorizing and organizing information
  • Flexible Containers: Bubbles for custom data presentation

Key Features

  • Accessibility First: Built with ARIA attributes and screen reader support
  • Design System Integration: Seamlessly works with Blackcat UI themes and spacing
  • TypeScript Support: Full type safety with excellent IntelliSense
  • Responsive Design: Adapts to different screen sizes and orientations
  • Customizable: Extensive styling and behavior customization options
  • Performance Optimized: Efficient rendering with minimal re-renders
  • Consistent Styling: Unified visual language across all datum components

Usage

Badge Component

import { Badge } from '@tcn/ui-datum';

function NotificationBadge() {
  return (
    <Badge value="3" backgroundColor="#ff4444" textColor="#ffffff">
      <button>Notifications</button>
    </Badge>
  );
}

function StatusBadge() {
  return (
    <Badge value="New" backgroundColor="#00cc00" textColor="#ffffff">
      <div>User Profile</div>
    </Badge>
  );
}

Chip Component

import { Chip } from '@tcn/ui-datum';

function TagChips() {
  return (
    <div>
      <Chip color="#ff6b6b">React</Chip>
      <Chip color="#4ecdc4">TypeScript</Chip>
      <Chip color="#45b7d1">CSS</Chip>
      <Chip color="#96ceb4" disabled>Deprecated</Chip>
    </div>
  );
}

function CategoryChips() {
  return (
    <div>
      <Chip color="var(--accent-color)">Technology</Chip>
      <Chip color="var(--status-info)">Business</Chip>
      <Chip color="var(--status-warning)">Design</Chip>
    </div>
  );
}

Bubble Component

import { Bubble } from '@tcn/ui-datum';

function InfoBubble() {
  return (
    <Bubble
      backgroundColor="#e3f2fd"
      textColor="#1976d2"
      size="lg"
      elevate={true}
    >
      Important Information
    </Bubble>
  );
}

function StatusBubble() {
  return (
    <Bubble
      backgroundColor="var(--status-success)"
      textColor="#ffffff"
      size="md"
    >
      Active
    </Bubble>
  );
}

Combined Usage

import { Badge, Chip, Bubble } from '@tcn/ui-datum';

function UserCard() {
  return (
    <div className="user-card">
      <div className="user-info">
        <h3>John Doe</h3>
        <Chip color="var(--accent-color)">Admin</Chip>
        <Bubble backgroundColor="#e8f5e8" textColor="#2e7d32">
          Verified
        </Bubble>
      </div>

      <Badge value="5" backgroundColor="#ff4444" textColor="#ffffff">
        <button>Messages</button>
      </Badge>
    </div>
  );
}

Component Features

Badge System

  • Overlay Positioning: Badges automatically position over content
  • Customizable Colors: Flexible background and text color options
  • Value Display: Support for numbers, text, and custom content
  • Responsive Design: Adapts to different content sizes

Chip Components

  • Flexible Sizing: Automatic sizing based on content
  • Color Customization: Custom colors for different categories
  • Disabled States: Visual indication for inactive chips
  • Layout Integration: Works seamlessly with layout components

Bubble Components

  • Size Variants: Multiple size options (xs, sm, md, lg, xl)
  • Elevation Support: Optional shadow and depth effects
  • Color Control: Custom background and text colors
  • Flexible Content: Support for any type of content

Design System Integration

All components automatically integrate with:

  • Spacing Scale: Consistent margins, padding, and gaps
  • Color System: Primary, secondary, and accent color schemes
  • Typography: Font sizes and weights that match your design
  • Scalar Support: Automatic scaling for different screen densities
  • Theme Support: Light and dark theme compatibility

Accessibility Features

  • ARIA Attributes: Proper labeling and state management
  • Screen Reader Support: Semantic markup and descriptions
  • High Contrast: Designed for various visual accessibility needs
  • Keyboard Navigation: Full keyboard support for interactive elements
  • Color Independence: Information not conveyed by color alone

When to Use

Choose @tcn/ui-datum when you need:

  • Notification badges and status indicators
  • Data tags and categorization chips
  • Information bubbles and highlights
  • Consistent data presentation patterns
  • Components that integrate with your design system
  • Accessible data display components

Customization

Components support extensive customization through:

  • CSS Custom Properties: Dynamic styling changes
  • CSS Modules: Scoped styling with design system integration
  • Props Interface: Flexible configuration through component props
  • Theme Integration: Automatic adaptation to different themes
  • Color Options: Custom colors for different contexts and states

Performance

  • Efficient Rendering: Minimal re-renders and optimized updates
  • Bundle Optimization: Tree-shakeable components for smaller bundles
  • Memory Management: Proper cleanup and event handling
  • Lazy Loading: Support for on-demand component loading
  • Optimized Layouts: Efficient positioning and sizing calculations

License

Apache-2.0