create_mode
Creates a new mode (theme) within a tokenset to support different design variations like light/dark themes.Tool Schema
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
tokenset_id | string | Yes | The ID of the tokenset to create the mode in |
name | string | Yes | The name of the mode (1-255 characters) |
is_default | boolean | No | Whether this mode should be the default mode |
Response
Example Usage in Claude
Create a Dark Mode
Create a Default Mode
Common Use Cases
1. Theme Support
2. Accessibility
3. Brand Variations
Notes
- If
is_defaultis set totrue, the previous default mode will be automatically changed to non-default - Each tokenset can have only one default mode
- New modes start empty - you’ll need to create tokens within them
- Mode names should be unique within a tokenset
- Common mode names include: Light, Dark, High Contrast, Seasonal, etc.
Default Mode Behavior
- When no specific mode is requested, the default mode is used
- Every tokenset must have exactly one default mode
- If you don’t specify
is_default, the new mode will be non-default
See Also
- list_modes - View all modes in a tokenset
- get_mode - Get mode details
- create_token - Add tokens to the new mode
- update_mode - Change mode settings