Icons in the workbench

Docs

A project draws its icons from one set, in one style. The editor's Icons tab changes that choice, and the preview, the exports and the UI kit all follow it.

How to use it

Open the editor and pick the Icons tab, after Component. It shows the current choice, then:

  • Icon set. One card per set: Lucide, Phosphor, Tabler and Material Symbols. Each card draws the same eight icons in that set.
  • Style. The chosen set's styles and weights. More variants lists the rest when the set has more than six.
  • Filled when selected. For Phosphor's line weights and Material Symbols' line styles, a switch for whether an icon inside a selected control is drawn filled.

Hovering a card repaints the preview beside it. Clicking a card makes it an unsaved change: the tab wears the amber dot, Save counts it, Discard drops it, and Undo and Redo (Cmd+Z, Shift+Cmd+Z) step through it like a token edit. Picking another set keeps your "Filled when selected" choice when the new set offers one.

Ask AI can change the icons too: ask for "lighter icons" or "switch to Tabler", and the change lands as the same unsaved edit.

How it works

The choice is a project setting, not a token: it names a set, a style, a weight where the set has weights, and the "Filled when selected" flag. It is saved with the token edits, in the same request, and read back when the workbench opens; a stored value the app cannot read falls back to Lucide at its regular stroke rather than failing the page.

Every icon the preview draws goes through one icons module that reads the choice, so the component gallery, the blocks and the sample pages change together. The exports carry the same choice: the UI kit ships the icons module, and the agent guide tells a coding agent which set to use.

What can go wrong

  • The preview shows Lucide for a moment after a switch: the new set is loading.
  • The switch is missing: the chosen style is already filled, or the set (Lucide, Tabler) has no filled twin for its icons.