HTML form fields must have a name attribute as it is paired with the field value during submission, e.g. name1=value1&name2=value2. name must be unique within its <form>.
The id is not used by the form but still useful for general element stuff, e.g. CSS & JS selector.
What does this change?
Regarding Checkbox component:
name
prop.name
prop to primary identifier.id
prop to optional.Why?
HTML form fields must have a
name
attribute as it is paired with the field value during submission, e.g.name1=value1&name2=value2
.name
must be unique within its<form>
.The
id
is not used by the form but still useful for general element stuff, e.g. CSS & JS selector.Related issues:
Resolves #205.
How is it tested?
Storybook.
How is it documented?
Storybook.