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

@dg-design/react

v0.31.0

Published

Dogeol Design System(DDS)의 React 컴포넌트 패키지.

Readme

@dg-design/react

Dogeol Design System(DDS)의 React 컴포넌트 패키지.

코딩 에이전트용 사용 가이드 스킬이 패키지에 들어 있다(skill/dg-design/). 연결 방법은 AGENT-SETUP.md — 에이전트에게 "설치된 dg-design의 설정 가이드를 읽고 스킬을 구성해줘"라고 요청하면 된다.

설치

pnpm add @dg-design/react @dg-design/tokens

peer dependency: react / react-dom ^18 || ^19

배포는 GitHub Actions에서 npm trusted publishing으로 이뤄지며, 각 버전에 provenance가 첨부된다.

컴포넌트 CSS는 side-effect import로 자동 로드되지만, 토큰 값(--dds-*)은 별도 패키지에 있다. 소비 앱이 진입점에서 @dg-design/tokens/tokens.css를 직접 로드해야 한다.

import "@dg-design/tokens/tokens.css";

사용

컴포넌트는 배럴(@dg-design/react)과 서브패스(@dg-design/react/<컴포넌트>) 두 방식으로 가져올 수 있다. 배럴에서 컴포넌트 하나만 가져올 때 쓰지 않는 컴포넌트의 CSS까지 번들에 실리는지는 번들러에 따라 다르다(예: Vite는 쓰는 것만, esbuild는 전부 싣는다). 서브패스는 번들러와 상관없이 그 컴포넌트가 쓰는 CSS만 실으므로 서브패스를 권장한다.

Button

import { Button } from "@dg-design/react/button";

<Button intent="brand" variant="solid" size="medium">확인</Button>
<Button intent="neutral" variant="weak" size="small">취소</Button>
<Button variant="ghost" disabled>비활성</Button>
  • intent: "brand" | "neutral" | "critical" (기본 "brand"). critical은 삭제·탈퇴처럼 되돌릴 수 없는 실행에만 쓴다
  • variant: "solid" | "weak" | "ghost" (기본 "solid")
  • size: "xsmall" | "small" | "medium" | "large" (기본 "medium")
  • iconOnly: 아이콘만 있는 정사각 버튼. 접근 이름은 aria-label로 준다
  • disabled: native disabled 속성

Dialog

import { Button } from "@dg-design/react/button";
import { Dialog } from "@dg-design/react/dialog";

<Dialog.Root>
  <Dialog.Trigger asChild>
    <Button>열기</Button>
  </Dialog.Trigger>
  <Dialog.Overlay />
  <Dialog.Content>
    <Dialog.Title>제목</Dialog.Title>
    <Dialog.Description>설명</Dialog.Description>
    <Dialog.Close asChild>
      <Button variant="weak" intent="neutral">닫기</Button>
    </Dialog.Close>
  </Dialog.Content>
</Dialog.Root>

Select

import { Select } from "@dg-design/react/select";

<Select.Root name="fruit" onValueChange={(value) => console.log(value)}>
  <Select.Trigger placeholder="과일을 고르세요" />
  <Select.Content>
    <Select.Option value="apple">Apple</Select.Option>
    <Select.Option value="banana">Banana</Select.Option>
  </Select.Content>
</Select.Root>

다른 컴포넌트도 @dg-design/react/<kebab-case 이름>(예: ./context-menu, ./text-field)으로 가져온다. 전체 목록은 패키지 package.json의 exports에 있고, 컴포넌트별 API와 예제는 skill/dg-design/references/에 있다.

배럴에서 한 번에 가져와도 된다:

import { Button, Dialog, Select } from "@dg-design/react";

번들러 요구사항

컴포넌트 CSS는 side-effect import(import "./button.css")로 자동 로드된다. .css import를 처리하는 번들러(Vite, webpack, Next.js 등)가 있어야 하며, 없는 환경(Jest 기본 설정, 순수 Node 실행, tsx 스크립트 등)에서는 스타일이 빠지는 게 아니라 ERR_UNKNOWN_FILE_EXTENSION으로 크래시한다.

Jest에서는 moduleNameMapper로 CSS import를 빈 모듈로 돌린다:

// jest.config.js
module.exports = {
  moduleNameMapper: {
    "\\.css$": "<rootDir>/test/style-mock.js",
  },
};
// test/style-mock.js
module.exports = {};

스타일 오버라이드

className prop으로 오버라이드한다. 컴포넌트가 방출하는 CSS 클래스 이름(.dds-button--variant_solid 등)은 공개 API가 아니며 예고 없이 바뀔 수 있다 — 직접 참조하지 말 것.

className과 컴포넌트 CSS(@layer dds)가 실제로 어떤 순서로 이기는지, 토큰 오버라이드·createTheme 전체 브랜드 교체까지 포함한 계약 전체는 docs/customization.md 참고.