A Figma plugin for authoring and editing Spectrum component option schemas with visual UI, JSON validation, and accessibility features.
The Component Options Editor provides a user-friendly interface for creating and managing component option schemas for Adobe Spectrum Design System components. It features:
- Visual Form Editor: Intuitive forms for each option type (string, boolean, size, color, icon, etc.)
- JSON Editor: Powerful CodeMirror-based editor with syntax highlighting and validation
- Real-time Validation: Instant feedback using Ajv JSON schema validator
- Accessibility: ARIA labels, live regions, and screen reader support
- Error Highlighting: Visual error indicators with line/column precision
- Import/Export: Load and download component schemas
From the monorepo root:
pnpm installBuild the plugin via moon:
pnpm moon run component-options-editor:buildOr from the tool directory:
cd tools/component-options-editor
pnpm run buildpnpm moon run component-options-editor:testpnpm moon run component-options-editor:type-checkpnpm moon run component-options-editor:lintRun all checks:
pnpm moon run component-options-editor:validate- Build the plugin (see above)
- Open Figma Desktop
- Go to Plugins → Development → Import plugin from manifest
- Navigate to
tools/component-options-editor/dist/manifest.json - Select the manifest file to load the plugin
The plugin will appear in your Figma plugins menu under "Component Options Editor".
- Framework: Lit (Web Components)
- UI Library: Spectrum Web Components
- Language: TypeScript
- Build: Webpack
- Testing: AVA
- Validation: Ajv 2020-12 JSON Schema validator
src/plugin/plugin.ts- Figma plugin backendsrc/ui/app/litAppElement.ts- Main UI applicationsrc/ui/validators/jsonValidator.ts- JSON schema validationsrc/ui/app/templates/- Form templates for each option typewebpack.config.cjs- Webpack build configurationmoon.yml- Moon task definitions
See the monorepo CONTRIBUTING.md for general contribution guidelines.
Follow Conventional Commits:
feat(tools): add new feature
fix(tools): fix issue
docs(tools): update documentation
Apache 2.0