{({ open }) => (
<>
{selectedPerson.name}
{open && (
{/* Using `static`, `Listbox.Options` is always rendered and ignores the `open` state. */}
{people.map(person => (
{person.name}
))}
)}
>
)}
)
}
```
### Disabling an option
Use the `disabled` prop to disable a `Listbox.Option`. This will make it unselectable via keyboard navigation, and it will be skipped when pressing the up/down arrows.
```jsx
import { useState } from 'react'
import { Listbox } from '@headlessui/react'
const people = [
{ id: 1, name: 'Durward Reynolds', unavailable: false },
{ id: 2, name: 'Kenton Towne', unavailable: false },
{ id: 3, name: 'Therese Wunsch', unavailable: false },
{ id: 4, name: 'Benedict Kessler', unavailable: true },
{ id: 5, name: 'Katelyn Rohan', unavailable: false },
]
function MyListbox() {
const [selectedPerson, setSelectedPerson] = useState(people[0])
return (