mcpField
W
wds-docs

wds-docs

github.com/wixDesign & UI36329 installsUpdated today
Repository

About wds-docs

WDS Documentation Navigator is a command-line documentation lookup skill for developers with @wix/design-system installed. It searches components, props, examples, and icons, using a helper script to locate project dependencies and allowing direct document lookup as a fallback.

Key features

  1. 01Searches components by keyword
  2. 02Shows component props and example lists
  3. 03Finds named examples and JSX code
  4. 04Searches Wix icons
  5. 05Supports direct local documentation lookup

Use cases

  1. 01Find components matching a UI design
  2. 02Check component props and usage examples
  3. 03Look up icon names and variants

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/wix/skills --skill wds-docs

After installing, type/wds-docsin Claude Code to confirm it loaded.

Bundled filesreferences/file-structure.mdscripts/wds.js

Details

From the project README

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.js — 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.js
WDS="<this-skill-dir>/scripts/wds.js"

node $WDS search <keyword>                # Find components by keyword
node $WDS component <Name>                 # Get props + example list
node $WDS example <Name> "<ExampleName>"   # Get a specific example
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.

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: 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)
  • 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";

Comments

Markdown supported