create_text_style
Create a local text style with customizable font family, size, weight, line height, decoration, and spacing. Apply the style to nodes to maintain typography consistency.
Instructions
Create a new local text style (typography preset). Returns the new style's ID. Apply it to nodes with apply_style_to_node. Use get_styles to list existing text styles.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Style name — use slash notation to organise into groups e.g. 'Heading/H1', 'Body/Regular' | |
| fontSize | No | Font size in pixels (default 16) | |
| fontStyle | No | Font style variant e.g. 'Regular', 'Bold', 'Medium', 'SemiBold' (default Regular) | |
| fontFamily | No | Font family name e.g. 'Inter', 'Roboto' (default Inter). Must be installed in Figma. | |
| description | No | Optional human-readable description shown in the Figma style panel | |
| lineHeightUnit | No | Line height unit: PIXELS (default) or PERCENT | |
| textDecoration | No | Text decoration: NONE (default), UNDERLINE, or STRIKETHROUGH | |
| lineHeightValue | No | Line height value (unit set by lineHeightUnit) | |
| letterSpacingUnit | No | Letter spacing unit: PIXELS (default) or PERCENT | |
| letterSpacingValue | No | Letter spacing value (unit set by letterSpacingUnit) |