Layouts simplify UI design by letting you create reusable page structures that can be shared across multiple Forms. For example, you can design a Layout with a navigation bar, and any Form using this Layout will inherit the navigation bar. This makes UI building easier, faster and more consistent.
1. Better reusability with shared Layouts 2. Layouts make building page navigation into your apps simpler than ever. 3. You can create complex UI structures by nesting Layouts within each other.
I can see using this to create “smart” wrappers for data-entry components, e.g., to add a visible Prompt (and optional info/warning/error label/link).
I can’t wait to see what other innovative uses the folks here invent!
This looks cool! Sounds like custom components as containers with slots but with more convenience.
Regarding the navigation example - I much prefer the template/route setup of hash-based routing from anvil-extras. Once I got used to that, it opened up so many possibilities. I feel like that should be the standard tbh.
I think it should be standard and, since it’s done at lower level than Anvil Extras, it should not have hash, so we would finally get rid of the SEO limitation.
Google Maps for example is a single page app similar to Anvil apps, but every time you click or search, the URL changes, but the app is not reloaded. I do the same in my apps: when the user types something in my search bars, I update the hash, so the user can copy the link to that specific search.