Ariakit
/

command-space-disabled

Notice that you cannot trigger the alert with the space key.

Accessible button
import { Command } from "@ariakit/react";
import "./style.css";
export default function Example() {
return (
<div>
<p>Notice that you cannot trigger the alert with the space key.</p>
className="button"
clickOnSpace={false}
onClick={() => alert("Accessible button clicked")}
render={<div />}
>
Accessible button
</Command>
</div>
);
}

Stay tuned

Join 1,000+ subscribers and receive monthly tips & updates on new Ariakit content.

No spam. Unsubscribe anytime. Read latest issue