About
Listbox with react-aria
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Listbox [react-aria] to your project and fits it to your theme.
Code
How Listbox [react-aria] is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { ListBox, ListBoxItem } from "@/components/ui/listbox";
function ListBoxSimple() {
return (
<div className="overflow-hidden rounded-lg border border-input min-w-[300px]">
<ListBox
className="bg-background p-1 text-sm"
aria-label="Choose option"
selectionMode="single"
>
<ListBoxItem id="1">Option 1</ListBoxItem>
<ListBoxItem id="2">Option 2</ListBoxItem>
<ListBoxItem id="3">Option 3</ListBoxItem>
</ListBox>
</div>
);
}
export { ListBoxSimple };
![Listbox [react-aria] preview](https://cdn.21st.dev/cdn-cgi/image/fit=scale-down,width=1080,quality=75,format=webp/https://cdn.21st.dev/user_2nElBLvklOKlAURm6W1PTu6yYFh/listbox/default/preview.png?v=1)






