Form with Select
Combining Form and Select to create an accessible custom select widget that works with the browser's built-in validation and native form submission.
import "./style.css";
import {
FormSelect,
} from "./form.jsx";
export default function Example() {
const $ = form.names;
form.useSubmit(() => {
alert(JSON.stringify(form.getState().values));
});
return (
</FormSelect>
<div className="buttons">
</div>
);
}
Components
FormSubmit information with accessible interactive controls in React. Take advantage of the browser's built-in validation with screen reader support. This component is based on the WAI-ARIA Form Role.
SelectSelect a value from a list of options presented in a dropdown menu, similar to the native HTML select element. This component is based on the WAI-ARIA Combobox Pattern.
Follow updates
Join 1,000+ subscribers and receive monthly updates with the latest improvements on Examples.