Design principles
Give the next action a clear place on the page. Keep the user’s work and keyboard focus intact when the server replies.
Give one action the most weight
Here the main task is to try the inventory. Downloading the example is an alternative. Setup instructions can sit quietly alongside both.
- Primary
- Open inventory
- Secondary
- Download example
- Quiet
- Read quick start
View the HTML
<a class="rl-button rl-button-primary" href="/playground">Open inventory</a>
<a class="rl-button rl-button-secondary" href="/downloads/studio-inventory.tar.gz" download>Download example</a>
<a class="rl-button rl-button-ghost" href="/start">Read quick start</a>Use a link for a destination and a submit button for a save. Both can use the same button styles.
Keep the draft through a failed save
In the inventory editor, the user can correct a field without opening the drawer again. The server returns the entered values together with the error.
- While saving
- Mark the form busy and disable its submit button until the request finishes.
- Invalid field
- Return the populated form with HTTP 422. Show the error beside the field and move focus there.
- Saved
- Update the row, confirm the change and return focus to its edit button.
Try a failed save in the playground and open HTTP exchange to inspect the response.
Keep controls aligned across themes
Default fields and buttons start at 40 px. The select reserves space for its arrow on the trailing edge. The switch thumb keeps the same inset at either end of its track. Test each position in light and dark mode.