ComboboxCancel
Reseting the value of a Combobox with a button rendered next to it using the ComboboxCancel
component.
import "./style.css";
import * as Ariakit from "@ariakit/react";
const list = [
"Apple",
"Bacon",
"Banana",
"Broccoli",
"Burger",
"Cake",
"Candy",
];
export default function Example() {
return (
<div className="wrapper">
<label className="label">
Your favorite food
<div className="combobox-wrapper">
placeholder="e.g., Apple"
className="combobox"
/>
</div>
</label>
{list.map((value) => (
key={value}
className="combobox-item"
/>
))}
</div>
);
}
Components
Follow updates
Join 1,000+ subscribers and receive monthly updates with the latest improvements on Examples.