wix-design-system

작성자: wix

Wix Design System 컴포넌트 참조. @wix/design-system으로 UI를 구축하거나, 컴포넌트를 선택하거나, props와 예제를 확인하거나, 테스트를 작성할 때 사용합니다.

npx skills add https://github.com/wix/skills --skill wix-design-system

WDS Documentation Navigator

Prerequisite: @wix/design-system must be installed (npm i @wix/design-system or yarn add @wix/design-system).

Helper Script

This skill bundles scripts/wds.cjs — a Node.js helper that auto-discovers @wix/design-system in node_modules (handles monorepos and workspaces) and provides focused lookups. Run it from the user's project directory using the absolute path to the bundled script:

# WDS is the absolute path to this skill's scripts/wds.cjs
WDS="<this-skill-dir>/scripts/wds.cjs"

node $WDS search <keyword>                 # Find components by keyword
node $WDS component <Name>                 # Get props + example list (one component)
node $WDS components <Name1> <Name2>...    # Same as `component`, but for several at once
node $WDS example <Name> "<ExampleName>"   # Get a specific example
node $WDS testkit <Name> [method]          # Get testkit imports + driver API
node $WDS icons <query>                    # Search for icons

Workflow

Step 1: Find the right component

node $WDS search table
node $WDS search form input validation
node $WDS search modal dialog popup

Multiple keywords are OR-matched. Returns component names, descriptions, and usage guidance.

Step 2: Get props and available examples

node $WDS component Button

Returns the full props list (types and descriptions) plus a list of all available examples. For large prop files (>200 lines), returns a summary with prop names and types.

If you already know which several components you'll need (e.g. after Step 1 returned a shortlist), prefer the batch form to avoid one round-trip per component:

node $WDS components Button Card Table Input Text Thumbnail

Output is each component's props block separated by ---. Missing components are logged to stderr and skipped; the command only fails if every requested component is missing.

Step 3: Get a specific example

node $WDS example Button "Loading state"

Returns the example description and JSX code. Matching is case-insensitive and supports substrings (e.g., "loading" matches "Loading state").

Step 4: Write tests with the component testkit

node $WDS testkit Button             # Imports + full driver API for Button
node $WDS testkit Button click       # Just the click() method details

Returns import snippets for unidriver, vanilla, puppeteer, and playwright flavors plus the driver method API (name, args, return type, description). Method name matching is case-insensitive substring.

Step 5: Find icons

node $WDS icons Add Edit Delete

Icons are from @wix/wix-ui-icons-common. Each icon has a Small variant (e.g., Add + AddSmall).

Fallback: Direct File Access

If the script is unavailable, docs are at node_modules/@wix/design-system/dist/docs/:

  • components.md — component catalog (~978 lines, grep only)
  • components/{Name}Props.md — props per component
  • components/{Name}Examples.md — examples per component (grep ^### for section list)
  • components/{Name}Testkit.md — testkit imports + driver API per component (grep ^### for method list)
  • testkits.md — testkit catalog (list of components with generated testkit docs)
  • icons.md — icon catalog (~818 lines, grep only)

Don't read these files fully. Grep for keywords, then read specific sections with offset/limit. See references/file-structure.md for the exact docs file layout and section shapes.


Quick Component Mapping (Design to WDS)

Design ElementWDS ComponentNotes
Rectangle/container<Box>Layout wrapper
Text button<TextButton>Secondary actions
Input with label<FormField> + <Input>Wrap inputs
Toggle<ToggleSwitch>On/off settings
Modal<Modal> + <CustomModalLayout>Use together
Grid<Layout> + <Cell>Responsive

Spacing (px to SP conversion)

When designer specifies pixels, convert to the nearest SP token:

TokenClassicStudio
SP16px4px
SP212px8px
SP318px12px
SP424px16px
SP530px20px
SP636px24px
<Box gap="SP2" padding="SP3">

Only use SP tokens for gap, padding, margin — not for width/height.

Imports

import { Button, Card, Image } from "@wix/design-system";
import { Add, Edit, Delete } from "@wix/wix-ui-icons-common";

Troubleshooting

  • Components render unstyled (plain HTML look, missing WDS spacing/typography): add import "@wix/design-system/styles.global.css"; once to the root/main component (e.g. page.tsx, modal entry) — not child/tab/helper files.

wix의 다른 스킬

rp-execute-import
wix
생성된 추출/가져오기 파이프라인을 실행하고 실행 결과를 기록합니다. 설정과 코드 생성이 완료되고 사용자가 실행 계획을 승인했을 때 사용합니다.
official
rp-import-codegen
wix
스키마 및 매핑 아티팩트로부터 마이그레이션 리더, 변환기, Wix 라이터를 생성합니다. 마이그레이션 하에서 실행 가능한 추출/임포트 코드를 생성할 때 사용합니다.
official
rp-orchestration
wix
RePlatform 소스에서 Wix로의 마이그레이션을 마이그레이션 프로젝트 아티팩트를 검사하여 다음 워크플로 단계로 라우팅합니다. 마이그레이션을 시작, 계속 또는 복구할 때 사용합니다.
official
rp-setup-discovery
wix
승인된 매핑 계획에서 Wix 환경 사전 요구 사항(앱, 컬렉션, 스키마)을 도출합니다. 매핑 검토 후, 임포트 코드 생성 전에 사용합니다.
official
rp-target-wix
wix
Wix 타겟 어댑터로, 검증된 쓰기 프리미티브(wix-writers.js)와 계약 테스트를 포함합니다. Wix 라이터를 벤더링하거나, API 형태를 검증하거나, Wix…
official
wds-docs
wix
Wix 디자인 시스템 컴포넌트 참조. @wix/design-system으로 UI를 구축하거나, 컴포넌트를 선택하거나, props와 예제를 확인할 때 사용합니다. "what…"에서 트리거됩니다.
official
rp-mapper
wix
발견된 소스 엔티티와 필드를 Wix 대상에 매핑하고 손실 정도를 문서화합니다. discovery 이후 mapping-plan.md와 mapping-summary.md를 작성할 때 사용합니다.
official
site-management
wix
Wix 사이트 선택 및 전환을 관리합니다. 액세스 토큰 권한에 따라 Wix API에서 사이트를 동적으로 가져옵니다.
official