r/Frontend • u/Turbulent_Rooster_73 • 22h ago
Same YAML, two renders: our wireframe CLI draws a page as a greyscale product mock or as a line blueprint, switched by one key
I'm one of the people behind wf (Wireframes), an open-source CLI (MIT) that turns YAML into clickable greyscale HTML wireframes for web, iOS and Android. A person or an agent writes the YAML, wf renders it. This post is about one part of it: the two render modes.
A page picks its mode with one key:
page:
id: settings
renderMode: line # card is the default
Images: the first one is an AI-generated header, not a screenshot. The other two are real wf screenshots output of two page files that are identical apart from that one line (I diffed them).
What changes between the modes
- card: light grey page (#f3f4f6), white surfaces with a 1px border and a soft shadow, rounded corners. The gaps between cards show the grey background, so they work as gutters. It reads like a lo-fi product mock.
- line: white page, no fills, every surface is a hairline outline, corners are sharp or barely rounded (the page's corner radius is divided by 3, so 12px becomes 4px), buttons are hairline buttons. It reads like a blueprint.
What doesn't change
The element tree, the layout and the sizes. And both modes are greyscale: hue only shows up for severity (the danger button in the screenshots, invalid fields, alerts, badges). There's a test that fails if one of the severity colours leaks into any other selector.
One CSS detail I like
Only nodes the renderer marks data-wf-frame="surface" draw a box at all. In card mode that box is a border plus a shadow. In line mode it's an outline with outline-offset: -1px, so the stroke sits inside the box and switching modes doesn't change any element's size or move anything. Layout is identical, only the paint differs.
Try it
It's not on npm yet, so it runs from a checkout:
&&
&&
Then open build/web/index.html. wf catalogue --mode line renders the whole element catalogue in either mode if you want to compare all elements side by side. Spec for the modes: docs/cli/rendering-modes.md.
Repo: https://github.com/UnlikeOtherAI/wireframes
What I'd like feedback on
- If you review wireframes with other people: which of these would you show to a client, and which to developers?
- Does line mode look "unfinished" enough that nobody starts arguing about visual polish too early?
- Should the two modes differ in anything beyond paint, like type weight or density?