Sorry, but you either have no stories or none are selected somehow.
If the problem persists, check the browser console, or the terminal you've run Storybook from.
The Form
component is a slightly opinionated <form>
tag with a flex layout and set vertical gap.
spacing-s
.spacing-m
.The spacing docs can be found here.
When an error occurs at a level that is not specific to one field, use InlineMessage
to give the user feedback:
The InlineMessage docs can be found here.
Consider using an Inline message when help is needed to fill the form.
When the user clicks on the cancel button or go back to the previous page, provide a confirm dialog.
You can easily build that dialog with the Modal component..
In case of error after submission, the focus on the screen should be on the first field errored. If more than one field in error, the focus should be placed on the first one.
Choosing between readonly
and disabled
states is not really easy!
A readonly element is not editable, but gets sent when the form is submitted.
A disabled element isn't editable and isn't sent on submit.
Another difference is that readonly elements can be focused (and getting focused when "tabbing" through a form) while disabled elements can't.
Non applicable