Back to the changelog
0.4.1
Controls and embeds in the preview
This release comes through the preview: @uxfront/unframework 0.4.1 takes @unframework.dev/visual 0.5.0, which lets you try an example's props as you look at it, and show the example live on another page. If you run unframework preview, update @unframework.dev/visual to 0.5.0 along with it.
New
- Selecting an example shows a group of controls for each component it renders. A value reaches every instance that doesn't set the prop itself, so a colours example can toggle
disabledand keep each button's colour. - Each example has a URL of its own on each target,
embed.html?example=<id>&target=<target>, so another page can show it in an<iframe>.controls=trueshows its controls,theme=lightortheme=darksets its colour mode, andresize=truereports its height to the page that frames it. @layoutin an example's doc comment sets how it sits in its frame, the waydisplay: flexwould, like@layout column align-start gap.
Improved
- The preview centres every example and component in its frame, with
1remof padding, so a small component no longer sits in a corner. This moves every existing example, and@layout nonegives the old full-width block back.