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

@kimminhyeock/ui-component

v0.1.4

Published

Tailwind + Headless UI 기반 공용 UI 라이브러리.

Readme

ui-component

Tailwind + Headless UI 기반 공용 UI 라이브러리.

컨셉

  • Atomic Design: 재사용 가능한 단위만 atoms / molecules 로 분리
  • 폴더: kebab-case, 컴포넌트: camelCase
  • 생명주기: 부모 props로 제어 (controlled). 도메인 로직은 훅으로 분리
  • 다중 라이브러리 대응: className, style 등으로 스타일 주입 가능
  • 테마: Tailwind 기반 키 기반 테마. themes 레지스트리 + defaultThemeKey로 선택, base와 merge

설치

npm install @headlessui/react tailwindcss clsx tailwind-merge
# peer: react, react-dom

사용

테마 (키 기반)

import { ThemeProvider, useTheme, useThemeKey, useThemeActions, Button } from 'ui-component';
import { neonTheme } from 'ui-component';

const themes = {
  default: {},
  neon: neonTheme,
};

<ThemeProvider themes={themes} defaultThemeKey="neon">
  <Button variant="primary">클릭</Button>
</ThemeProvider>;
  • : useTheme() 현재 테마, useThemeKey() 현재 키, useThemeActions()setThemeKey, updateTheme
  • 프리셋: neonTheme, spaceTheme, retroTheme export

컴포넌트 단위 theme

<Button theme={{ primary: 'bg-green-600' }} variant="primary">
  저장
</Button>

훅 (도메인 로직)

import { useDisclosure, Modal, Button } from 'ui-component';

function MyForm() {
  const { isOpen, open, close } = useDisclosure();
  return (
    <>
      <Button onClick={open}>열기</Button>
      <Modal open={isOpen} onClose={close} title="제목">
        내용
      </Modal>
    </>
  );
}

프로젝트 구조

src/
  theme/           # base-theme, merge-theme, ThemeProvider
  components/
    atoms/         # Button, Input, Badge
    molecules/     # Modal, Dropdown, Tabs, Checkbox (Headless UI 래핑)
  hooks/           # useDisclosure 등
  utils/           # cn (class 병합)
  types/           # Stylable, ThemedComponent, ControlledProps

소비 측에서 Tailwind content에 node_modules/ui-component/src/**/*.{js,ts,jsx,tsx} 를 포함해야 합니다.

Storybook (데모·사용법)

npm run storybook
  • Atoms: Button, Input, Badge — variant/size/테마 오버라이드 예시
  • Molecules: Modal, Dropdown, Tabs, Checkbox — 제어/비제어, 훅(useDisclosure) 연동 예시
  • Theme/Override: 키 기반 테마, Neon/Space/Retro 프리셋 및 전체 컴포넌트 데모

빌드: npm run build-storybookstorybook-static 출력

테스트

npm run test        # watch
npm run test:run    # 1회 실행

Vitest + Testing Library. src/**/*.test.{ts,tsx}

npm 배포

npm run build
npm publish

prepublishOnly로 publish 시 자동 빌드. 스코프 패키지 공개: publishConfig.access: "public". 저장소 URL은 package.jsonrepository.url에 설정.