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

@sellmate/design-system-react

v1.23.0

Published

Design System - React Component Wrappers

Readme

Sellmate Design System - React

React component wrappers for Sellmate Design System built with Stencil web components.

Installation

npm install @sellmate/design-system-react

Project Setup

커스텀 엘리먼트는 패키지 import 시점에 자동 등록됩니다. defineCustomElements() 별도 호출이나 StencilProvider 설정은 불필요합니다.

React (Vite / CRA)

1. CSS 전역 importsrc/main.tsx

import "@sellmate/design-system/styles.css";

2. SdModalContainer 최상단 배치src/App.tsx

sdModalsd-modal-container를 자동으로 생성하지만, z-index 제어 및 렌더 위치를 명시적으로 지정하려면 루트에 배치합니다.

import { SdModalContainer } from "@sellmate/design-system-react";

export default function App() {
  return (
    <>
      <SdModalContainer />
      {/* 라우터, 레이아웃 등 */}
    </>
  );
}

Next.js (App Router)

1. CSS 전역 importapp/layout.tsx

import "@sellmate/design-system/styles.css";

2. 'use client' 필수 — 컴포넌트를 사용하는 모든 파일에 선언 필요

"use client";

import { SdButton } from "@sellmate/design-system-react/next";

3. SdModalContainer 루트 배치app/layout.tsx

layout.tsx는 서버 컴포넌트이므로 클라이언트 전용 Provider를 별도 파일로 분리합니다.

// app/providers.tsx
"use client";

import { SdModalContainer } from "@sellmate/design-system-react/next";

export default function Providers({ children }: { children: React.ReactNode }) {
  return (
    <>
      <SdModalContainer />
      {children}
    </>
  );
}
// app/layout.tsx
import "@sellmate/design-system/styles.css";
import Providers from "./providers";

export default function RootLayout({
  children,
}: {
  children: React.ReactNode;
}) {
  return (
    <html lang="ko">
      <body>
        <Providers>{children}</Providers>
      </body>
    </html>
  );
}

4. 컴포넌트 importdynamic({ ssr: false }) 패턴

"use client";

import dynamic from "next/dynamic";

const SdButton = dynamic(
  () =>
    import("@sellmate/design-system-react").then((mod) => ({
      default: mod.SdButton,
    })),
  { ssr: false, loading: () => <></> },
);

Utility Functions

sdModal@sellmate/design-system-react

React 컴포넌트를 모달로 열 수 있는 React-aware 버전입니다.

import { sdModal } from "@sellmate/design-system-react";

// Confirm 모달
sdModal
  .confirm({
    type: "positive" | "negative" | "default",
    title: "제목",
    topMessage: ["메시지"],
    mainButtonLabel: "확인",
    subButtonLabel: "취소",
    persistent: false, // true 시 ESC/백드롭으로 닫기 불가
  })
  .onOk(() => {})
  .onCancel(() => {})
  .onClose(() => {});

// React 컴포넌트를 모달로 열기
sdModal.create({
  component: MyModalComponent,
  componentProps: { title: "제목" }, // 컴포넌트에 전달할 props
  persistent: true,
});

// Loading 모달
const dialog = sdModal.loading({ state: "loading" });
dialog.update({ state: "error", message: "오류 발생" });
dialog.close();

// 전역 설정
sdModal.configure({ zIndex: 1000 });

주의: sdModal.create에 React 컴포넌트를 전달하면 내부적으로 새로운 React 루트가 생성됩니다. 부모 트리의 Context(Redux, React Router, Theme 등)가 자동으로 상속되지 않으므로 모달 컴포넌트 내부에서 필요한 Provider를 직접 감싸야 합니다.


sdToast@sellmate/design-system/utils

import { sdToast } from "@sellmate/design-system/utils";

// 토스트 생성
await sdToast.create("메시지", "success" | "error" | "warning" | "info");

// 개별/전체 닫기
await sdToast.dismiss(id);
await sdToast.dismissAll();

// 전역 설정
sdToast.configure({
  position: "top-right",
  maxVisible: 5,
  defaultDuration: 3000,
  zIndex: 9999,
});

sdToastsd-toast-container를 자동으로 생성하므로 별도의 Provider 배치가 불필요합니다.


sdLoading@sellmate/design-system-react

import { sdLoading } from "@sellmate/design-system-react";

const hide = sdLoading.show(); // 전체화면 로딩 표시
hide(); // 로딩 숨김

sdLoading.show({ message: "처리 중..." });

Available Components

입력

| 컴포넌트 | 설명 | | ------------------- | -------------------------- | | SdInput | 텍스트 입력 | | SdNumberInput | 숫자 입력 | | SdTextarea | 멀티라인 텍스트 입력 | | SdBarcodeInput | 바코드 스캐너 입력 | | SdCheckbox | 체크박스 | | SdRadio | 라디오 버튼 | | SdRadioGroup | 라디오 그룹 | | SdRadioButton | 버튼형 라디오 | | SdSwitch | 스위치 토글 | | SdToggle | 토글 | | SdSelect | 단일/다중 선택 (그룹 지원) | | SdDatePicker | 날짜 선택 | | SdDateRangePicker | 날짜 범위 선택 | | SdFilePicker | 파일 선택 |

버튼

| 컴포넌트 | 설명 | | ------------------ | ---------------- | | SdButton | 기본 버튼 | | SdGhostButton | 고스트 버튼 | | SdDropdownButton | 드롭다운 버튼 | | SdTextLink | 텍스트 링크 버튼 |

표시

| 컴포넌트 | 설명 | | -------------------- | ---------------------- | | SdTag | 태그 | | SdBadge | 뱃지 | | SdIcon | 아이콘 | | SdTooltip | 툴팁 | | SdPopover | 팝오버 | | SdLinearProgress | 선형 진행 바 | | SdCircleProgress | 원형 진행 바 | | SdLoadingContainer | 로딩 오버레이 컨테이너 | | SdGuide | 가이드 텍스트 | | SdCard | 카드 |

레이아웃 / 구조

| 컴포넌트 | 설명 | | -------------- | ------------------------------------ | | SdField | 폼 필드 래퍼 (label + input + error) | | SdForm | 폼 유효성 검사 컨테이너 | | SdTabs | 탭 네비게이션 | | SdTable | 데이터 테이블 | | SdPagination | 페이지네이션 |

모달 / 알림

| 컴포넌트 | 설명 | | ------------------ | ------------------------------------ | | SdModalContainer | sdModal Provider (루트에 1회 배치) | | SdConfirmModal | Confirm 모달 (직접 렌더) | | SdActionModal | Action 모달 (직접 렌더) | | SdLoadingModal | Loading 모달 (직접 렌더) | | SdToastContainer | Toast 컨테이너 (sdToast가 자동 생성) | | SdToast | 개별 Toast |


Available Types

import type {
  // Table
  SdTableColumn,
  SdTableRow,
  // Select
  SelectOption,
  // Radio
  RadioValue,
  RadioOption,
  // Button
  ButtonName,
  DropdownButtonItem,
  // Form
  Rule,
  ValidatableField,
  // Checkbox
  CheckedType,
  // Tag
  TagName,
  // Toast
  ToastType,
  // DateBox
  DateBoxType,
  // Tabs
  TabOption,
  // sdModal
  SdModalCreateOption,
} from "@sellmate/design-system-react";

Hooks

useSdTableVirtualScroll

import { useSdTableVirtualScroll } from "@sellmate/design-system-react";

const { virtualRows, totalHeight, scrollToIndex } = useSdTableVirtualScroll({
  rowCount: data.length,
  rowHeight: 48,
  containerHeight: 400,
});

Requirements

  • React 16.8.0 or higher
  • React DOM 16.8.0 or higher

License

MIT