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

@cyouh95/data-dictionary-viewer

v0.3.1

Published

[![](https://img.shields.io/npm/v/@cyouh95/data-dictionary-viewer.svg?style=for-the-badge)](https://www.npmjs.com/package/@cyouh95/data-dictionary-viewer)

Readme

Data Dictionary Viewer

Data Dictionary Viewer is a customizable component for visualizing data dictionaries. It supports list and table views, includes built-in search, and offers modern, responsive styling. Easy to embed, easy to style.

Features

🔍 Searchable: Filter variable names and descriptions

🧱 Two Views: Toggle between List and Table formats

🎨 Theme Support: Light and dark themes with CSS variable overrides

🔌 Plug & Play: Easy to integrate in any React app or use as a standalone Web Component

⚡ Fast Parsing: Parses CSV data

Project overview

Built with React, the Data Dictionary Viewer is available as:

🚀 Live demo: https://bmir-radx.github.io/data-dictionary-viewer-component/

Input data

Data dictionaries are expected to follow these specifications. The input data can be provided as:

  • CSV file
  • Raw string
  • URL to API endpoint

Dependencies

React Component

Installation

$ npm install @cyouh95/data-dictionary-viewer

Usage

Import the DataDictionaryViewer component and CSS file in your React project:

import { DataDictionaryViewer } from '@cyouh95/data-dictionary-viewer'
import '@cyouh95/data-dictionary-viewer/style.css'

Use component as:

<DataDictionaryViewer data="data_dictionary_file.csv" />

Full list of props:

| Prop Name | Type | Default | Options | Description | |---------------|----------|-----------|-------------------------|--------------------------------------------------| | data | string | — | required | Path to the CSV data dictionary file OR string containing the data OR URL to API endpoint. | | initialView | string | 'list' | 'list', 'table' | Set the default view mode when component loads. | | showSearch | boolean | true | true, false | Toggle visibility of the search bar. | | heading | string | 'Data Dictionary Viewer' | Any string | Custom title displayed at the top. | | theme | string | 'light' | 'light', 'dark' | Choose between different visual themes. |

Customization

Customize styles by overriding CSS variables:

:root {
    --dd-color-primary: #bb86fc;
    ...
}

If using a theme other than the default light theme, override CSS variables using corresponding theme class selector:

.dark {
    --dd-color-primary: #bb86fc;
    ...
}

See full list of CSS variables below.

Web Component

Import data-dictionary-viewer.js in your HTML file:

<script type="module" src="data-dictionary-viewer.js"></script>

Use component as:

<data-dictionary-viewer data="data_dictionary_file.csv"></data-dictionary-viewer>

Full list of attributes:

| Attribute Name | Type | Default | Options | Description | |---------------|----------|-----------|-------------------------|--------------------------------------------------| | data | string | — | required | Path to the CSV data dictionary file OR string containing the data OR URL to API endpoint. | | initial-view | string | 'list' | 'list', 'table' | Set the default view mode when component loads. | | show-search | string | 'true' | 'true', 'false' | Toggle visibility of the search bar. | | heading | string | 'Data Dictionary Viewer' | Any string | Custom title displayed at the top. | | theme | string | 'light' | 'light', 'dark' | Choose between different visual themes. |

Customization

Customize styles by overriding CSS variables:

data-dictionary-viewer {
    --dd-color-primary: #bb86fc;
    ...
}

If using a theme other than the default light theme, override CSS variables using corresponding theme class selector:

data-dictionary-viewer .dark {
    --dd-color-primary: #bb86fc;
    ...
}

See full list of CSS variables below.

CSS variable reference

| CSS Variable | Description | |--------------------------------|-----------------------------------------------------------------------------| | --dd-font-family | Default font stack | | --dd-color-text | Color of text | | --dd-color-body-bg | Background color of overall page body | | --dd-color-primary | Primary accent color used for buttons and icon | | --dd-color-on-primary | Text/icon color when placed on --dd-color-primary | | --dd-color-secondary | Secondary accent color used for table header background | | --dd-color-on-secondary | Text/icon color when placed on --dd-color-secondary | | --dd-color-content-bg | Background color of content areas | | --dd-color-content-border | Border color around content areas | | --dd-color-card-bg | Background color of cards | | --dd-color-card-border | Border color around cards | | --dd-color-card-block-bg | Background color of inner card blocks | | --dd-color-card-block-border | Border color around inner card blocks | | --dd-color-button-text | Color of text inside buttons | | --dd-color-button-bg | Background color of buttons | | --dd-color-button-bg-hover | Background color of buttons on hover | | --dd-color-button-border | Border color around buttons | | --dd-color-table-border | Border color around tables | | --dd-color-table-odd | Background color of odd table rows | | --dd-color-table-even | Background color of even table rows | | --dd-color-input-bg | Background color of input fields | | --dd-color-input-border | Border color around input fields | | --dd-color-tooltip-background| Background color of tooltips | | --dd-color-filter | Color of filter icons in table view | | --dd-shadow | Box shadow used for elements such as buttons |

Set up locally

Clone the repository:

$ git clone https://github.com/bmir-radx/data-dictionary-viewer-component.git
$ cd data-dictionary-viewer-component

Install packages:

$ npm install

Run locally:

$ npm run dev

See: index.html, main.jsx

Deploy to GitHub Pages

$ npm run deploy

This will run the predeploy and deploy scripts defined in package.json:

"scripts": {
    "predeploy": "vite build --config vite.config.gh.js",
    "deploy": "gh-pages -d build"
}

Or, set up GitHub Actions as seen in deploy.yml.

See: index.html, main.jsx, vite.config.gh.js (outputs to build/ folder)

👉 View demo GitHub Pages site

Publish to NPM

$ npm run build

This will run the build script defined in package.json:

"scripts": {
    "build": "vite build"
}

Increment version of package:

# Use one of the following based on changes made:
$ npm version patch
$ npm version minor
$ npm version major

Publish to NPM registry:

$ npm publish --access public

See: index.ts, vite.config.ts (outputs to dist/ folder)

👉 View NPM package

Convert to Web Component

$ npm run convert

This will run the convert script defined in package.json:

"scripts": {
    "convert": "vite build --config vite.config.web.js"
}

See: web.jsx, vite.config.web.js (outputs to web/ folder)

👉 View Web Component file