Light and dark versions of the same tile set

The design systems team does this in the same session as the component tiles. The light set is already exportable. You also need the same tiles in dark, without editing the artboards and without writing a theme back into .lerret/.

This is the same tiles, a second run. The person doing it already has the artboards from the tile set. They should not fork every file for dark. They should not commit a dark default by accident.

The job is two full PNG sets from the same tiles. Source artboards stay as they are. Data stays as it is. --config theme-dark.json deep-merges into the run’s config vars. You write light to one --out and dark to another. The default theme is still the default.

Give Lerret the same components under .lerret/ and a config file for the run. export writes PNGs. Same tiles, theme vars swapped, second set.

The component is unchanged from the component-tile artboards: .lerret/design-system/component-tile.jsx, one artboard per library component under .lerret/design-system/. You do not fork the tiles for dark. The tiles already read theme vars. The config file swaps those vars for the run.

Data is unchanged. This is the fourth of the four bulk patterns: --config to swap theme vars without touching the source. theme-dark.json deep-merges into the run’s config vars. --config is never written back into .lerret/, so a dark run cannot become the committed default. That is the whole point of the flag on this case. There is no batch product, no queue, no orchestrator.

The images are two full PNG sets: --out lerret-export/light and --out lerret-export/dark. Same tiles, same category folders, two themes.

Two themes, zero source edits, and the config file is never written back into .lerret/, so the default stays clean. A second copy of every artboard for dark is how the sets drift. You use Lerret because the theme is a run flag, and the source tiles stay one set.

npx @lerret/cli@latest export --config theme-dark.json --out lerret-export/dark

Start a project with npx create-lerret@latest. More in the use cases index.