Skip to content

ListBox

A listbox displays a list of options and allows a user to select one or more of them.

Import

ts
import { ListBox, ListBoxItem, ListBoxItemIndicator, ListBoxSection } from '@heroui-vue/vue'

Usage

BobB
bob@heroui.com
FredF
fred@heroui.com
MarthaM
martha@heroui.com

<template>
  <ListBox aria-label="Users" class="demo-list-box" selection-mode="single">
    <ListBoxItem id="1" text-value="Bob">
      <Avatar size="sm">
        <AvatarImage alt="Bob" src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg" />
        <AvatarFallback>B</AvatarFallback>
      </Avatar>
      <div class="demo-list-box-user">
        <Label>Bob</Label>
        <Description>bob@heroui.com</Description>
      </div>
      <ListBoxItemIndicator />
    </ListBoxItem>
    <ListBoxItem id="2" text-value="Fred">
      <Avatar size="sm">
        <AvatarImage alt="Fred" src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg" />
        <AvatarFallback>F</AvatarFallback>
      </Avatar>
      <div class="demo-list-box-user">
        <Label>Fred</Label>
        <Description>fred@heroui.com</Description>
      </div>
      <ListBoxItemIndicator />
    </ListBoxItem>
    <ListBoxItem id="3" text-value="Martha">
      <Avatar size="sm">
        <AvatarImage alt="Martha" src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg" />
        <AvatarFallback>M</AvatarFallback>
      </Avatar>
      <div class="demo-list-box-user">
        <Label>Martha</Label>
        <Description>martha@heroui.com</Description>
      </div>
      <ListBoxItemIndicator />
    </ListBoxItem>
  </ListBox>
</template>

<script setup lang="ts">
import { Avatar, AvatarFallback, AvatarImage, Description, Label, ListBox, ListBoxItem, ListBoxItemIndicator } from '@heroui-vue/vue'
</script>

<style lang="less">
.demo-list-box {
  width: 13.75rem;
}

.demo-list-box-user {
  display: flex;
  flex-direction: column;
}
</style>

Anatomy

vue
<ListBox>
  <ListBoxItem>
    <Label />
    <Description />
    <ListBoxItemIndicator />
  </ListBoxItem>
  <ListBoxSection>
    <Header />
    <ListBoxItem>
      <Label />
    </ListBoxItem>
  </ListBoxSection>
</ListBox>

With Sections

Actions
Create a new file
N
Make changes
E
Danger zone
Move to trash
D

<template>
  <Surface class="demo-list-box-surface">
    <ListBox aria-label="File actions" class="demo-list-box-actions" selection-mode="none" @action="handleAction">
      <ListBoxSection>
        <Header>Actions</Header>
        <ListBoxItem id="new-file" text-value="New file">
          <div class="demo-list-box-action-icon">
            <svg aria-hidden="true" fill="none" viewBox="0 0 16 16">
              <path d="M8 3v10M3 8h10" stroke="currentColor" stroke-linecap="round" stroke-width="1.8" />
            </svg>
          </div>
          <div class="demo-list-box-user">
            <Label>New file</Label>
            <Description>Create a new file</Description>
          </div>
          <Kbd class="demo-list-box-kbd" :keys="['⌘']" variant="light">N</Kbd>
        </ListBoxItem>
        <ListBoxItem id="edit-file" text-value="Edit file">
          <div class="demo-list-box-action-icon">
            <svg aria-hidden="true" fill="none" viewBox="0 0 16 16">
              <path d="M10.9 2.6 13.4 5.1 6.2 12.3 3 13l.7-3.2 7.2-7.2Z" stroke="currentColor" stroke-linejoin="round" stroke-width="1.5" />
            </svg>
          </div>
          <div class="demo-list-box-user">
            <Label>Edit file</Label>
            <Description>Make changes</Description>
          </div>
          <Kbd class="demo-list-box-kbd" :keys="['⌘']" variant="light">E</Kbd>
        </ListBoxItem>
      </ListBoxSection>
      <Separator />
      <ListBoxSection>
        <Header>Danger zone</Header>
        <ListBoxItem id="delete-file" text-value="Delete file" variant="danger">
          <div class="demo-list-box-action-icon demo-list-box-action-icon--danger">
            <svg aria-hidden="true" fill="none" viewBox="0 0 16 16">
              <path d="M3.5 4.5h9M6.5 2.5h3M5 4.5l.5 9h5l.5-9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
            </svg>
          </div>
          <div class="demo-list-box-user">
            <Label>Delete file</Label>
            <Description>Move to trash</Description>
          </div>
          <Kbd class="demo-list-box-kbd" :keys="['⌘', '⇧']" variant="light">D</Kbd>
        </ListBoxItem>
      </ListBoxSection>
    </ListBox>
  </Surface>
</template>

<script setup lang="ts">
import { Description, Header, Kbd, Label, ListBox, ListBoxItem, ListBoxSection, Separator, Surface } from '@heroui-vue/vue'

const handleAction = (key: string | number) => {
  window.alert(`Selected item: ${key}`)
}
</script>

<style lang="less">
.demo-list-box-surface {
  width: 16rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-surface);
}

.demo-list-box-actions {
  width: 100%;
  padding: 0.5rem;
}

.demo-list-box-user {
  display: flex;
  flex-direction: column;
}

.demo-list-box-action-icon {
  display: flex;
  height: 2rem;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.0625rem;
  color: var(--color-muted);

  svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
  }
}

.demo-list-box-action-icon--danger {
  color: var(--color-danger);
}

.demo-list-box-kbd {
  margin-inline-start: auto;
}
</style>

Multi Select

BobB
bob@heroui.com
FredF
fred@heroui.com
MarthaM
martha@heroui.com

<template>
  <Surface class="demo-list-box-surface">
    <ListBox aria-label="Users" selection-mode="multiple">
      <ListBoxItem v-for="user in users" :id="user.id" :key="user.id" :text-value="user.name">
        <Avatar size="sm">
          <AvatarImage :alt="user.name" :src="user.avatar" />
          <AvatarFallback>{{ user.fallback }}</AvatarFallback>
        </Avatar>
        <div class="demo-list-box-user">
          <Label>{{ user.name }}</Label>
          <Description>{{ user.email }}</Description>
        </div>
        <ListBoxItemIndicator />
      </ListBoxItem>
    </ListBox>
  </Surface>
</template>

<script setup lang="ts">
import { Avatar, AvatarFallback, AvatarImage, Description, Label, ListBox, ListBoxItem, ListBoxItemIndicator, Surface } from '@heroui-vue/vue'

const users = [
  { id: '1', name: 'Bob', email: 'bob@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg', fallback: 'B' },
  { id: '2', name: 'Fred', email: 'fred@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg', fallback: 'F' },
  { id: '3', name: 'Martha', email: 'martha@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg', fallback: 'M' },
]
</script>

<style lang="less">
.demo-list-box-surface {
  width: 16rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-surface);
}

.demo-list-box-user {
  display: flex;
  flex-direction: column;
}
</style>

With Disabled Items

Actions
Create a new file
N
Make changes
E
Danger zone
Move to trash
D

<template>
  <Surface class="demo-list-box-surface">
    <ListBox
      aria-label="File actions"
      class="demo-list-box-actions"
      :disabled-keys="['delete-file']"
      selection-mode="none"
      @action="handleAction"
    >
      <ListBoxSection>
        <Header>Actions</Header>
        <ListBoxItem id="new-file" text-value="New file">
          <div class="demo-list-box-action-icon">
            <svg aria-hidden="true" fill="none" viewBox="0 0 16 16">
              <path d="M8 3v10M3 8h10" stroke="currentColor" stroke-linecap="round" stroke-width="1.8" />
            </svg>
          </div>
          <div class="demo-list-box-user">
            <Label>New file</Label>
            <Description>Create a new file</Description>
          </div>
          <Kbd class="demo-list-box-kbd" :keys="['⌘']" variant="light">N</Kbd>
        </ListBoxItem>
        <ListBoxItem id="edit-file" text-value="Edit file">
          <div class="demo-list-box-action-icon">
            <svg aria-hidden="true" fill="none" viewBox="0 0 16 16">
              <path d="M10.9 2.6 13.4 5.1 6.2 12.3 3 13l.7-3.2 7.2-7.2Z" stroke="currentColor" stroke-linejoin="round" stroke-width="1.5" />
            </svg>
          </div>
          <div class="demo-list-box-user">
            <Label>Edit file</Label>
            <Description>Make changes</Description>
          </div>
          <Kbd class="demo-list-box-kbd" :keys="['⌘']" variant="light">E</Kbd>
        </ListBoxItem>
      </ListBoxSection>
      <Separator />
      <ListBoxSection>
        <Header>Danger zone</Header>
        <ListBoxItem id="delete-file" text-value="Delete file" variant="danger">
          <div class="demo-list-box-action-icon demo-list-box-action-icon--danger">
            <svg aria-hidden="true" fill="none" viewBox="0 0 16 16">
              <path d="M3.5 4.5h9M6.5 2.5h3M5 4.5l.5 9h5l.5-9" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" />
            </svg>
          </div>
          <div class="demo-list-box-user">
            <Label>Delete file</Label>
            <Description>Move to trash</Description>
          </div>
          <Kbd class="demo-list-box-kbd" :keys="['⌘', '⇧']" variant="light">D</Kbd>
        </ListBoxItem>
      </ListBoxSection>
    </ListBox>
  </Surface>
</template>

<script setup lang="ts">
import { Description, Header, Kbd, Label, ListBox, ListBoxItem, ListBoxSection, Separator, Surface } from '@heroui-vue/vue'

const handleAction = (key: string | number) => {
  window.alert(`Selected item: ${key}`)
}
</script>

<style lang="less">
.demo-list-box-surface {
  width: 16rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-surface);
}

.demo-list-box-actions {
  width: 100%;
  padding: 0.5rem;
}

.demo-list-box-user {
  display: flex;
  flex-direction: column;
}

.demo-list-box-action-icon {
  display: flex;
  height: 2rem;
  align-items: flex-start;
  justify-content: center;
  padding-top: 0.0625rem;
  color: var(--color-muted);

  svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
  }
}

.demo-list-box-action-icon--danger {
  color: var(--color-danger);
}

.demo-list-box-kbd {
  margin-inline-start: auto;
}
</style>

Custom Check Icon

BobB
bob@heroui.com
FredF
fred@heroui.com
MarthaM
martha@heroui.com

<template>
  <Surface class="demo-list-box-surface">
    <ListBox aria-label="Users" selection-mode="multiple">
      <ListBoxItem v-for="user in users" :id="user.id" :key="user.id" :text-value="user.name">
        <Avatar size="sm">
          <AvatarImage :alt="user.name" :src="user.avatar" />
          <AvatarFallback>{{ user.fallback }}</AvatarFallback>
        </Avatar>
        <div class="demo-list-box-user">
          <Label>{{ user.name }}</Label>
          <Description>{{ user.email }}</Description>
        </div>
        <ListBoxItemIndicator>
          <template #default="{ isSelected }">
            <svg v-if="isSelected" aria-hidden="true" class="demo-list-box-check" fill="none" viewBox="0 0 16 16">
              <path d="M3.5 8.5 6.5 11.5 12.5 4.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" />
            </svg>
          </template>
        </ListBoxItemIndicator>
      </ListBoxItem>
    </ListBox>
  </Surface>
</template>

<script setup lang="ts">
import { Avatar, AvatarFallback, AvatarImage, Description, Label, ListBox, ListBoxItem, ListBoxItemIndicator, Surface } from '@heroui-vue/vue'

const users = [
  { id: '1', name: 'Bob', email: 'bob@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg', fallback: 'B' },
  { id: '2', name: 'Fred', email: 'fred@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg', fallback: 'F' },
  { id: '3', name: 'Martha', email: 'martha@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg', fallback: 'M' },
]
</script>

<style lang="less">
.demo-list-box-surface {
  width: 16rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-surface);
}

.demo-list-box-user {
  display: flex;
  flex-direction: column;
}

.demo-list-box-check {
  width: 1rem;
  height: 1rem;
  color: var(--color-accent);
}
</style>

Controlled

BobB
bob@heroui.com
FredF
fred@heroui.com
MarthaM
martha@heroui.com

Selected: 1

<template>
  <div class="demo-list-box-controlled">
    <Surface class="demo-list-box-surface">
      <ListBox v-model:selected-keys="selected" aria-label="Users" selection-mode="multiple">
        <ListBoxItem v-for="user in users" :id="user.id" :key="user.id" :text-value="user.name">
          <Avatar size="sm">
            <AvatarImage :alt="user.name" :src="user.avatar" />
            <AvatarFallback>{{ user.fallback }}</AvatarFallback>
          </Avatar>
          <div class="demo-list-box-user">
            <Label>{{ user.name }}</Label>
            <Description>{{ user.email }}</Description>
          </div>
          <ListBoxItemIndicator>
            <template #default="{ isSelected }">
              <svg v-if="isSelected" aria-hidden="true" class="demo-list-box-check" fill="none" viewBox="0 0 16 16">
                <path d="M3.5 8.5 6.5 11.5 12.5 4.5" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" />
              </svg>
            </template>
          </ListBoxItemIndicator>
        </ListBoxItem>
      </ListBox>
    </Surface>
    <p>Selected: {{ selected.length > 0 ? selected.join(', ') : 'None' }}</p>
  </div>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { Avatar, AvatarFallback, AvatarImage, Description, Label, ListBox, ListBoxItem, ListBoxItemIndicator, Surface } from '@heroui-vue/vue'

const selected = ref<Array<string | number>>(['1'])
const users = [
  { id: '1', name: 'Bob', email: 'bob@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg', fallback: 'B' },
  { id: '2', name: 'Fred', email: 'fred@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg', fallback: 'F' },
  { id: '3', name: 'Martha', email: 'martha@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg', fallback: 'M' },
]
</script>

<style lang="less">
.demo-list-box-controlled {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;

  p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.875rem;
  }
}

.demo-list-box-surface {
  width: 16rem;
  border-radius: 1.5rem;
  box-shadow: var(--shadow-surface);
}

.demo-list-box-user {
  display: flex;
  flex-direction: column;
}

.demo-list-box-check {
  width: 1rem;
  height: 1rem;
  color: var(--color-accent);
}
</style>

Custom Render Function

BobB
bob@heroui.com
FredF
fred@heroui.com
MarthaM
martha@heroui.com

<template>
  <ListBox aria-label="Users" class="demo-list-box" data-custom="true" selection-mode="single">
    <ListBoxItem v-for="user in users" :id="user.id" :key="user.id" data-custom="item" :text-value="user.name">
      <Avatar size="sm">
        <AvatarImage :alt="user.name" :src="user.avatar" />
        <AvatarFallback>{{ user.fallback }}</AvatarFallback>
      </Avatar>
      <div class="demo-list-box-user">
        <Label>{{ user.name }}</Label>
        <Description>{{ user.email }}</Description>
      </div>
      <ListBoxItemIndicator />
    </ListBoxItem>
  </ListBox>
</template>

<script setup lang="ts">
import { Avatar, AvatarFallback, AvatarImage, Description, Label, ListBox, ListBoxItem, ListBoxItemIndicator } from '@heroui-vue/vue'

const users = [
  { id: '1', name: 'Bob', email: 'bob@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg', fallback: 'B' },
  { id: '2', name: 'Fred', email: 'fred@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg', fallback: 'F' },
  { id: '3', name: 'Martha', email: 'martha@heroui.com', avatar: 'https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg', fallback: 'M' },
]
</script>

<style lang="less">
.demo-list-box {
  width: 13.75rem;
}

.demo-list-box-user {
  display: flex;
  flex-direction: column;
}
</style>

Virtualization

The Vue version currently shows the same large-list interaction shape with a scrollable list. A true virtualization adapter still needs to be added before claiming parity with React Aria Virtualizer.

emma.smith@acme.com
liam.smith@acme.com
olivia.smith@acme.com
noah.smith@acme.com
ava.smith@acme.com
james.smith@acme.com
sophia.smith@acme.com
oliver.smith@acme.com
isabella.smith@acme.com
lucas.smith@acme.com
mia.smith@acme.com
ethan.smith@acme.com
charlotte.smith@acme.com
mason.smith@acme.com
amelia.smith@acme.com
logan.smith@acme.com
harper.smith@acme.com
alexander.smith@acme.com
ella.smith@acme.com
benjamin.smith@acme.com
emma.johnson@acme.com
liam.johnson@acme.com
olivia.johnson@acme.com
noah.johnson@acme.com
ava.johnson@acme.com
james.johnson@acme.com
sophia.johnson@acme.com
oliver.johnson@acme.com
isabella.johnson@acme.com
lucas.johnson@acme.com
mia.johnson@acme.com
ethan.johnson@acme.com
charlotte.johnson@acme.com
mason.johnson@acme.com
amelia.johnson@acme.com
logan.johnson@acme.com
harper.johnson@acme.com
alexander.johnson@acme.com
ella.johnson@acme.com
benjamin.johnson@acme.com
emma.williams@acme.com
liam.williams@acme.com
olivia.williams@acme.com
noah.williams@acme.com
ava.williams@acme.com
james.williams@acme.com
sophia.williams@acme.com
oliver.williams@acme.com
isabella.williams@acme.com
lucas.williams@acme.com
mia.williams@acme.com
ethan.williams@acme.com
charlotte.williams@acme.com
mason.williams@acme.com
amelia.williams@acme.com
logan.williams@acme.com
harper.williams@acme.com
alexander.williams@acme.com
ella.williams@acme.com
benjamin.williams@acme.com
emma.brown@acme.com
liam.brown@acme.com
olivia.brown@acme.com
noah.brown@acme.com
ava.brown@acme.com
james.brown@acme.com
sophia.brown@acme.com
oliver.brown@acme.com
isabella.brown@acme.com
lucas.brown@acme.com
mia.brown@acme.com
ethan.brown@acme.com
charlotte.brown@acme.com
mason.brown@acme.com
amelia.brown@acme.com
logan.brown@acme.com
harper.brown@acme.com
alexander.brown@acme.com
ella.brown@acme.com
benjamin.brown@acme.com
emma.jones@acme.com
liam.jones@acme.com
olivia.jones@acme.com
noah.jones@acme.com
ava.jones@acme.com
james.jones@acme.com
sophia.jones@acme.com
oliver.jones@acme.com
isabella.jones@acme.com
lucas.jones@acme.com
mia.jones@acme.com
ethan.jones@acme.com
charlotte.jones@acme.com
mason.jones@acme.com
amelia.jones@acme.com
logan.jones@acme.com
harper.jones@acme.com
alexander.jones@acme.com
ella.jones@acme.com
benjamin.jones@acme.com
emma.garcia@acme.com
liam.garcia@acme.com
olivia.garcia@acme.com
noah.garcia@acme.com
ava.garcia@acme.com
james.garcia@acme.com
sophia.garcia@acme.com
oliver.garcia@acme.com
isabella.garcia@acme.com
lucas.garcia@acme.com
mia.garcia@acme.com
ethan.garcia@acme.com
charlotte.garcia@acme.com
mason.garcia@acme.com
amelia.garcia@acme.com
logan.garcia@acme.com
harper.garcia@acme.com
alexander.garcia@acme.com
ella.garcia@acme.com
benjamin.garcia@acme.com
emma.miller@acme.com
liam.miller@acme.com
olivia.miller@acme.com
noah.miller@acme.com
ava.miller@acme.com
james.miller@acme.com
sophia.miller@acme.com
oliver.miller@acme.com
isabella.miller@acme.com
lucas.miller@acme.com
mia.miller@acme.com
ethan.miller@acme.com
charlotte.miller@acme.com
mason.miller@acme.com
amelia.miller@acme.com
logan.miller@acme.com
harper.miller@acme.com
alexander.miller@acme.com
ella.miller@acme.com
benjamin.miller@acme.com
emma.davis@acme.com
liam.davis@acme.com
olivia.davis@acme.com
noah.davis@acme.com
ava.davis@acme.com
james.davis@acme.com
sophia.davis@acme.com
oliver.davis@acme.com
isabella.davis@acme.com
lucas.davis@acme.com
mia.davis@acme.com
ethan.davis@acme.com
charlotte.davis@acme.com
mason.davis@acme.com
amelia.davis@acme.com
logan.davis@acme.com
harper.davis@acme.com
alexander.davis@acme.com
ella.davis@acme.com
benjamin.davis@acme.com
emma.rodriguez@acme.com
liam.rodriguez@acme.com
olivia.rodriguez@acme.com
noah.rodriguez@acme.com
ava.rodriguez@acme.com
james.rodriguez@acme.com
sophia.rodriguez@acme.com
oliver.rodriguez@acme.com
isabella.rodriguez@acme.com
lucas.rodriguez@acme.com
mia.rodriguez@acme.com
ethan.rodriguez@acme.com
charlotte.rodriguez@acme.com
mason.rodriguez@acme.com
amelia.rodriguez@acme.com
logan.rodriguez@acme.com
harper.rodriguez@acme.com
alexander.rodriguez@acme.com
ella.rodriguez@acme.com
benjamin.rodriguez@acme.com
emma.martinez@acme.com
liam.martinez@acme.com
olivia.martinez@acme.com
noah.martinez@acme.com
ava.martinez@acme.com
james.martinez@acme.com
sophia.martinez@acme.com
oliver.martinez@acme.com
isabella.martinez@acme.com
lucas.martinez@acme.com
mia.martinez@acme.com
ethan.martinez@acme.com
charlotte.martinez@acme.com
mason.martinez@acme.com
amelia.martinez@acme.com
logan.martinez@acme.com
harper.martinez@acme.com
alexander.martinez@acme.com
ella.martinez@acme.com
benjamin.martinez@acme.com
emma.anderson@acme.com
liam.anderson@acme.com
olivia.anderson@acme.com
noah.anderson@acme.com
ava.anderson@acme.com
james.anderson@acme.com
sophia.anderson@acme.com
oliver.anderson@acme.com
isabella.anderson@acme.com
lucas.anderson@acme.com
mia.anderson@acme.com
ethan.anderson@acme.com
charlotte.anderson@acme.com
mason.anderson@acme.com
amelia.anderson@acme.com
logan.anderson@acme.com
harper.anderson@acme.com
alexander.anderson@acme.com
ella.anderson@acme.com
benjamin.anderson@acme.com
emma.taylor@acme.com
liam.taylor@acme.com
olivia.taylor@acme.com
noah.taylor@acme.com
ava.taylor@acme.com
james.taylor@acme.com
sophia.taylor@acme.com
oliver.taylor@acme.com
isabella.taylor@acme.com
lucas.taylor@acme.com
mia.taylor@acme.com
ethan.taylor@acme.com
charlotte.taylor@acme.com
mason.taylor@acme.com
amelia.taylor@acme.com
logan.taylor@acme.com
harper.taylor@acme.com
alexander.taylor@acme.com
ella.taylor@acme.com
benjamin.taylor@acme.com
emma.thomas@acme.com
liam.thomas@acme.com
olivia.thomas@acme.com
noah.thomas@acme.com
ava.thomas@acme.com
james.thomas@acme.com
sophia.thomas@acme.com
oliver.thomas@acme.com
isabella.thomas@acme.com
lucas.thomas@acme.com
mia.thomas@acme.com
ethan.thomas@acme.com
charlotte.thomas@acme.com
mason.thomas@acme.com
amelia.thomas@acme.com
logan.thomas@acme.com
harper.thomas@acme.com
alexander.thomas@acme.com
ella.thomas@acme.com
benjamin.thomas@acme.com
emma.jackson@acme.com
liam.jackson@acme.com
olivia.jackson@acme.com
noah.jackson@acme.com
ava.jackson@acme.com
james.jackson@acme.com
sophia.jackson@acme.com
oliver.jackson@acme.com
isabella.jackson@acme.com
lucas.jackson@acme.com
mia.jackson@acme.com
ethan.jackson@acme.com
charlotte.jackson@acme.com
mason.jackson@acme.com
amelia.jackson@acme.com
logan.jackson@acme.com
harper.jackson@acme.com
alexander.jackson@acme.com
ella.jackson@acme.com
benjamin.jackson@acme.com
emma.white@acme.com
liam.white@acme.com
olivia.white@acme.com
noah.white@acme.com
ava.white@acme.com
james.white@acme.com
sophia.white@acme.com
oliver.white@acme.com
isabella.white@acme.com
lucas.white@acme.com
mia.white@acme.com
ethan.white@acme.com
charlotte.white@acme.com
mason.white@acme.com
amelia.white@acme.com
logan.white@acme.com
harper.white@acme.com
alexander.white@acme.com
ella.white@acme.com
benjamin.white@acme.com
emma.harris@acme.com
liam.harris@acme.com
olivia.harris@acme.com
noah.harris@acme.com
ava.harris@acme.com
james.harris@acme.com
sophia.harris@acme.com
oliver.harris@acme.com
isabella.harris@acme.com
lucas.harris@acme.com
mia.harris@acme.com
ethan.harris@acme.com
charlotte.harris@acme.com
mason.harris@acme.com
amelia.harris@acme.com
logan.harris@acme.com
harper.harris@acme.com
alexander.harris@acme.com
ella.harris@acme.com
benjamin.harris@acme.com
emma.clark@acme.com
liam.clark@acme.com
olivia.clark@acme.com
noah.clark@acme.com
ava.clark@acme.com
james.clark@acme.com
sophia.clark@acme.com
oliver.clark@acme.com
isabella.clark@acme.com
lucas.clark@acme.com
mia.clark@acme.com
ethan.clark@acme.com
charlotte.clark@acme.com
mason.clark@acme.com
amelia.clark@acme.com
logan.clark@acme.com
harper.clark@acme.com
alexander.clark@acme.com
ella.clark@acme.com
benjamin.clark@acme.com
emma.lewis@acme.com
liam.lewis@acme.com
olivia.lewis@acme.com
noah.lewis@acme.com
ava.lewis@acme.com
james.lewis@acme.com
sophia.lewis@acme.com
oliver.lewis@acme.com
isabella.lewis@acme.com
lucas.lewis@acme.com
mia.lewis@acme.com
ethan.lewis@acme.com
charlotte.lewis@acme.com
mason.lewis@acme.com
amelia.lewis@acme.com
logan.lewis@acme.com
harper.lewis@acme.com
alexander.lewis@acme.com
ella.lewis@acme.com
benjamin.lewis@acme.com
emma.robinson@acme.com
liam.robinson@acme.com
olivia.robinson@acme.com
noah.robinson@acme.com
ava.robinson@acme.com
james.robinson@acme.com
sophia.robinson@acme.com
oliver.robinson@acme.com
isabella.robinson@acme.com
lucas.robinson@acme.com
mia.robinson@acme.com
ethan.robinson@acme.com
charlotte.robinson@acme.com
mason.robinson@acme.com
amelia.robinson@acme.com
logan.robinson@acme.com
harper.robinson@acme.com
alexander.robinson@acme.com
ella.robinson@acme.com
benjamin.robinson@acme.com
emma.walker@acme.com
liam.walker@acme.com
olivia.walker@acme.com
noah.walker@acme.com
ava.walker@acme.com
james.walker@acme.com
sophia.walker@acme.com
oliver.walker@acme.com
isabella.walker@acme.com
lucas.walker@acme.com
mia.walker@acme.com
ethan.walker@acme.com
charlotte.walker@acme.com
mason.walker@acme.com
amelia.walker@acme.com
logan.walker@acme.com
harper.walker@acme.com
alexander.walker@acme.com
ella.walker@acme.com
benjamin.walker@acme.com
emma.smith@acme.com
liam.smith@acme.com
olivia.smith@acme.com
noah.smith@acme.com
ava.smith@acme.com
james.smith@acme.com
sophia.smith@acme.com
oliver.smith@acme.com
isabella.smith@acme.com
lucas.smith@acme.com
mia.smith@acme.com
ethan.smith@acme.com
charlotte.smith@acme.com
mason.smith@acme.com
amelia.smith@acme.com
logan.smith@acme.com
harper.smith@acme.com
alexander.smith@acme.com
ella.smith@acme.com
benjamin.smith@acme.com
emma.johnson@acme.com
liam.johnson@acme.com
olivia.johnson@acme.com
noah.johnson@acme.com
ava.johnson@acme.com
james.johnson@acme.com
sophia.johnson@acme.com
oliver.johnson@acme.com
isabella.johnson@acme.com
lucas.johnson@acme.com
mia.johnson@acme.com
ethan.johnson@acme.com
charlotte.johnson@acme.com
mason.johnson@acme.com
amelia.johnson@acme.com
logan.johnson@acme.com
harper.johnson@acme.com
alexander.johnson@acme.com
ella.johnson@acme.com
benjamin.johnson@acme.com
emma.williams@acme.com
liam.williams@acme.com
olivia.williams@acme.com
noah.williams@acme.com
ava.williams@acme.com
james.williams@acme.com
sophia.williams@acme.com
oliver.williams@acme.com
isabella.williams@acme.com
lucas.williams@acme.com
mia.williams@acme.com
ethan.williams@acme.com
charlotte.williams@acme.com
mason.williams@acme.com
amelia.williams@acme.com
logan.williams@acme.com
harper.williams@acme.com
alexander.williams@acme.com
ella.williams@acme.com
benjamin.williams@acme.com
emma.brown@acme.com
liam.brown@acme.com
olivia.brown@acme.com
noah.brown@acme.com
ava.brown@acme.com
james.brown@acme.com
sophia.brown@acme.com
oliver.brown@acme.com
isabella.brown@acme.com
lucas.brown@acme.com
mia.brown@acme.com
ethan.brown@acme.com
charlotte.brown@acme.com
mason.brown@acme.com
amelia.brown@acme.com
logan.brown@acme.com
harper.brown@acme.com
alexander.brown@acme.com
ella.brown@acme.com
benjamin.brown@acme.com
emma.jones@acme.com
liam.jones@acme.com
olivia.jones@acme.com
noah.jones@acme.com
ava.jones@acme.com
james.jones@acme.com
sophia.jones@acme.com
oliver.jones@acme.com
isabella.jones@acme.com
lucas.jones@acme.com
mia.jones@acme.com
ethan.jones@acme.com
charlotte.jones@acme.com
mason.jones@acme.com
amelia.jones@acme.com
logan.jones@acme.com
harper.jones@acme.com
alexander.jones@acme.com
ella.jones@acme.com
benjamin.jones@acme.com
emma.garcia@acme.com
liam.garcia@acme.com
olivia.garcia@acme.com
noah.garcia@acme.com
ava.garcia@acme.com
james.garcia@acme.com
sophia.garcia@acme.com
oliver.garcia@acme.com
isabella.garcia@acme.com
lucas.garcia@acme.com
mia.garcia@acme.com
ethan.garcia@acme.com
charlotte.garcia@acme.com
mason.garcia@acme.com
amelia.garcia@acme.com
logan.garcia@acme.com
harper.garcia@acme.com
alexander.garcia@acme.com
ella.garcia@acme.com
benjamin.garcia@acme.com
emma.miller@acme.com
liam.miller@acme.com
olivia.miller@acme.com
noah.miller@acme.com
ava.miller@acme.com
james.miller@acme.com
sophia.miller@acme.com
oliver.miller@acme.com
isabella.miller@acme.com
lucas.miller@acme.com
mia.miller@acme.com
ethan.miller@acme.com
charlotte.miller@acme.com
mason.miller@acme.com
amelia.miller@acme.com
logan.miller@acme.com
harper.miller@acme.com
alexander.miller@acme.com
ella.miller@acme.com
benjamin.miller@acme.com
emma.davis@acme.com
liam.davis@acme.com
olivia.davis@acme.com
noah.davis@acme.com
ava.davis@acme.com
james.davis@acme.com
sophia.davis@acme.com
oliver.davis@acme.com
isabella.davis@acme.com
lucas.davis@acme.com
mia.davis@acme.com
ethan.davis@acme.com
charlotte.davis@acme.com
mason.davis@acme.com
amelia.davis@acme.com
logan.davis@acme.com
harper.davis@acme.com
alexander.davis@acme.com
ella.davis@acme.com
benjamin.davis@acme.com
emma.rodriguez@acme.com
liam.rodriguez@acme.com
olivia.rodriguez@acme.com
noah.rodriguez@acme.com
ava.rodriguez@acme.com
james.rodriguez@acme.com
sophia.rodriguez@acme.com
oliver.rodriguez@acme.com
isabella.rodriguez@acme.com
lucas.rodriguez@acme.com
mia.rodriguez@acme.com
ethan.rodriguez@acme.com
charlotte.rodriguez@acme.com
mason.rodriguez@acme.com
amelia.rodriguez@acme.com
logan.rodriguez@acme.com
harper.rodriguez@acme.com
alexander.rodriguez@acme.com
ella.rodriguez@acme.com
benjamin.rodriguez@acme.com
emma.martinez@acme.com
liam.martinez@acme.com
olivia.martinez@acme.com
noah.martinez@acme.com
ava.martinez@acme.com
james.martinez@acme.com
sophia.martinez@acme.com
oliver.martinez@acme.com
isabella.martinez@acme.com
lucas.martinez@acme.com
mia.martinez@acme.com
ethan.martinez@acme.com
charlotte.martinez@acme.com
mason.martinez@acme.com
amelia.martinez@acme.com
logan.martinez@acme.com
harper.martinez@acme.com
alexander.martinez@acme.com
ella.martinez@acme.com
benjamin.martinez@acme.com
emma.anderson@acme.com
liam.anderson@acme.com
olivia.anderson@acme.com
noah.anderson@acme.com
ava.anderson@acme.com
james.anderson@acme.com
sophia.anderson@acme.com
oliver.anderson@acme.com
isabella.anderson@acme.com
lucas.anderson@acme.com
mia.anderson@acme.com
ethan.anderson@acme.com
charlotte.anderson@acme.com
mason.anderson@acme.com
amelia.anderson@acme.com
logan.anderson@acme.com
harper.anderson@acme.com
alexander.anderson@acme.com
ella.anderson@acme.com
benjamin.anderson@acme.com
emma.taylor@acme.com
liam.taylor@acme.com
olivia.taylor@acme.com
noah.taylor@acme.com
ava.taylor@acme.com
james.taylor@acme.com
sophia.taylor@acme.com
oliver.taylor@acme.com
isabella.taylor@acme.com
lucas.taylor@acme.com
mia.taylor@acme.com
ethan.taylor@acme.com
charlotte.taylor@acme.com
mason.taylor@acme.com
amelia.taylor@acme.com
logan.taylor@acme.com
harper.taylor@acme.com
alexander.taylor@acme.com
ella.taylor@acme.com
benjamin.taylor@acme.com
emma.thomas@acme.com
liam.thomas@acme.com
olivia.thomas@acme.com
noah.thomas@acme.com
ava.thomas@acme.com
james.thomas@acme.com
sophia.thomas@acme.com
oliver.thomas@acme.com
isabella.thomas@acme.com
lucas.thomas@acme.com
mia.thomas@acme.com
ethan.thomas@acme.com
charlotte.thomas@acme.com
mason.thomas@acme.com
amelia.thomas@acme.com
logan.thomas@acme.com
harper.thomas@acme.com
alexander.thomas@acme.com
ella.thomas@acme.com
benjamin.thomas@acme.com
emma.jackson@acme.com
liam.jackson@acme.com
olivia.jackson@acme.com
noah.jackson@acme.com
ava.jackson@acme.com
james.jackson@acme.com
sophia.jackson@acme.com
oliver.jackson@acme.com
isabella.jackson@acme.com
lucas.jackson@acme.com
mia.jackson@acme.com
ethan.jackson@acme.com
charlotte.jackson@acme.com
mason.jackson@acme.com
amelia.jackson@acme.com
logan.jackson@acme.com
harper.jackson@acme.com
alexander.jackson@acme.com
ella.jackson@acme.com
benjamin.jackson@acme.com
emma.white@acme.com
liam.white@acme.com
olivia.white@acme.com
noah.white@acme.com
ava.white@acme.com
james.white@acme.com
sophia.white@acme.com
oliver.white@acme.com
isabella.white@acme.com
lucas.white@acme.com
mia.white@acme.com
ethan.white@acme.com
charlotte.white@acme.com
mason.white@acme.com
amelia.white@acme.com
logan.white@acme.com
harper.white@acme.com
alexander.white@acme.com
ella.white@acme.com
benjamin.white@acme.com
emma.harris@acme.com
liam.harris@acme.com
olivia.harris@acme.com
noah.harris@acme.com
ava.harris@acme.com
james.harris@acme.com
sophia.harris@acme.com
oliver.harris@acme.com
isabella.harris@acme.com
lucas.harris@acme.com
mia.harris@acme.com
ethan.harris@acme.com
charlotte.harris@acme.com
mason.harris@acme.com
amelia.harris@acme.com
logan.harris@acme.com
harper.harris@acme.com
alexander.harris@acme.com
ella.harris@acme.com
benjamin.harris@acme.com
emma.clark@acme.com
liam.clark@acme.com
olivia.clark@acme.com
noah.clark@acme.com
ava.clark@acme.com
james.clark@acme.com
sophia.clark@acme.com
oliver.clark@acme.com
isabella.clark@acme.com
lucas.clark@acme.com
mia.clark@acme.com
ethan.clark@acme.com
charlotte.clark@acme.com
mason.clark@acme.com
amelia.clark@acme.com
logan.clark@acme.com
harper.clark@acme.com
alexander.clark@acme.com
ella.clark@acme.com
benjamin.clark@acme.com
emma.lewis@acme.com
liam.lewis@acme.com
olivia.lewis@acme.com
noah.lewis@acme.com
ava.lewis@acme.com
james.lewis@acme.com
sophia.lewis@acme.com
oliver.lewis@acme.com
isabella.lewis@acme.com
lucas.lewis@acme.com
mia.lewis@acme.com
ethan.lewis@acme.com
charlotte.lewis@acme.com
mason.lewis@acme.com
amelia.lewis@acme.com
logan.lewis@acme.com
harper.lewis@acme.com
alexander.lewis@acme.com
ella.lewis@acme.com
benjamin.lewis@acme.com
emma.robinson@acme.com
liam.robinson@acme.com
olivia.robinson@acme.com
noah.robinson@acme.com
ava.robinson@acme.com
james.robinson@acme.com
sophia.robinson@acme.com
oliver.robinson@acme.com
isabella.robinson@acme.com
lucas.robinson@acme.com
mia.robinson@acme.com
ethan.robinson@acme.com
charlotte.robinson@acme.com
mason.robinson@acme.com
amelia.robinson@acme.com
logan.robinson@acme.com
harper.robinson@acme.com
alexander.robinson@acme.com
ella.robinson@acme.com
benjamin.robinson@acme.com
emma.walker@acme.com
liam.walker@acme.com
olivia.walker@acme.com
noah.walker@acme.com
ava.walker@acme.com
james.walker@acme.com
sophia.walker@acme.com
oliver.walker@acme.com
isabella.walker@acme.com
lucas.walker@acme.com
mia.walker@acme.com
ethan.walker@acme.com
charlotte.walker@acme.com
mason.walker@acme.com
amelia.walker@acme.com
logan.walker@acme.com
harper.walker@acme.com
alexander.walker@acme.com
ella.walker@acme.com
benjamin.walker@acme.com
emma.smith@acme.com
liam.smith@acme.com
olivia.smith@acme.com
noah.smith@acme.com
ava.smith@acme.com
james.smith@acme.com
sophia.smith@acme.com
oliver.smith@acme.com
isabella.smith@acme.com
lucas.smith@acme.com
mia.smith@acme.com
ethan.smith@acme.com
charlotte.smith@acme.com
mason.smith@acme.com
amelia.smith@acme.com
logan.smith@acme.com
harper.smith@acme.com
alexander.smith@acme.com
ella.smith@acme.com
benjamin.smith@acme.com
emma.johnson@acme.com
liam.johnson@acme.com
olivia.johnson@acme.com
noah.johnson@acme.com
ava.johnson@acme.com
james.johnson@acme.com
sophia.johnson@acme.com
oliver.johnson@acme.com
isabella.johnson@acme.com
lucas.johnson@acme.com
mia.johnson@acme.com
ethan.johnson@acme.com
charlotte.johnson@acme.com
mason.johnson@acme.com
amelia.johnson@acme.com
logan.johnson@acme.com
harper.johnson@acme.com
alexander.johnson@acme.com
ella.johnson@acme.com
benjamin.johnson@acme.com
emma.williams@acme.com
liam.williams@acme.com
olivia.williams@acme.com
noah.williams@acme.com
ava.williams@acme.com
james.williams@acme.com
sophia.williams@acme.com
oliver.williams@acme.com
isabella.williams@acme.com
lucas.williams@acme.com
mia.williams@acme.com
ethan.williams@acme.com
charlotte.williams@acme.com
mason.williams@acme.com
amelia.williams@acme.com
logan.williams@acme.com
harper.williams@acme.com
alexander.williams@acme.com
ella.williams@acme.com
benjamin.williams@acme.com
emma.brown@acme.com
liam.brown@acme.com
olivia.brown@acme.com
noah.brown@acme.com
ava.brown@acme.com
james.brown@acme.com
sophia.brown@acme.com
oliver.brown@acme.com
isabella.brown@acme.com
lucas.brown@acme.com
mia.brown@acme.com
ethan.brown@acme.com
charlotte.brown@acme.com
mason.brown@acme.com
amelia.brown@acme.com
logan.brown@acme.com
harper.brown@acme.com
alexander.brown@acme.com
ella.brown@acme.com
benjamin.brown@acme.com
emma.jones@acme.com
liam.jones@acme.com
olivia.jones@acme.com
noah.jones@acme.com
ava.jones@acme.com
james.jones@acme.com
sophia.jones@acme.com
oliver.jones@acme.com
isabella.jones@acme.com
lucas.jones@acme.com
mia.jones@acme.com
ethan.jones@acme.com
charlotte.jones@acme.com
mason.jones@acme.com
amelia.jones@acme.com
logan.jones@acme.com
harper.jones@acme.com
alexander.jones@acme.com
ella.jones@acme.com
benjamin.jones@acme.com
emma.garcia@acme.com
liam.garcia@acme.com
olivia.garcia@acme.com
noah.garcia@acme.com
ava.garcia@acme.com
james.garcia@acme.com
sophia.garcia@acme.com
oliver.garcia@acme.com
isabella.garcia@acme.com
lucas.garcia@acme.com
mia.garcia@acme.com
ethan.garcia@acme.com
charlotte.garcia@acme.com
mason.garcia@acme.com
amelia.garcia@acme.com
logan.garcia@acme.com
harper.garcia@acme.com
alexander.garcia@acme.com
ella.garcia@acme.com
benjamin.garcia@acme.com
emma.miller@acme.com
liam.miller@acme.com
olivia.miller@acme.com
noah.miller@acme.com
ava.miller@acme.com
james.miller@acme.com
sophia.miller@acme.com
oliver.miller@acme.com
isabella.miller@acme.com
lucas.miller@acme.com
mia.miller@acme.com
ethan.miller@acme.com
charlotte.miller@acme.com
mason.miller@acme.com
amelia.miller@acme.com
logan.miller@acme.com
harper.miller@acme.com
alexander.miller@acme.com
ella.miller@acme.com
benjamin.miller@acme.com
emma.davis@acme.com
liam.davis@acme.com
olivia.davis@acme.com
noah.davis@acme.com
ava.davis@acme.com
james.davis@acme.com
sophia.davis@acme.com
oliver.davis@acme.com
isabella.davis@acme.com
lucas.davis@acme.com
mia.davis@acme.com
ethan.davis@acme.com
charlotte.davis@acme.com
mason.davis@acme.com
amelia.davis@acme.com
logan.davis@acme.com
harper.davis@acme.com
alexander.davis@acme.com
ella.davis@acme.com
benjamin.davis@acme.com
emma.rodriguez@acme.com
liam.rodriguez@acme.com
olivia.rodriguez@acme.com
noah.rodriguez@acme.com
ava.rodriguez@acme.com
james.rodriguez@acme.com
sophia.rodriguez@acme.com
oliver.rodriguez@acme.com
isabella.rodriguez@acme.com
lucas.rodriguez@acme.com
mia.rodriguez@acme.com
ethan.rodriguez@acme.com
charlotte.rodriguez@acme.com
mason.rodriguez@acme.com
amelia.rodriguez@acme.com
logan.rodriguez@acme.com
harper.rodriguez@acme.com
alexander.rodriguez@acme.com
ella.rodriguez@acme.com
benjamin.rodriguez@acme.com
emma.martinez@acme.com
liam.martinez@acme.com
olivia.martinez@acme.com
noah.martinez@acme.com
ava.martinez@acme.com
james.martinez@acme.com
sophia.martinez@acme.com
oliver.martinez@acme.com
isabella.martinez@acme.com
lucas.martinez@acme.com
mia.martinez@acme.com
ethan.martinez@acme.com
charlotte.martinez@acme.com
mason.martinez@acme.com
amelia.martinez@acme.com
logan.martinez@acme.com
harper.martinez@acme.com
alexander.martinez@acme.com
ella.martinez@acme.com
benjamin.martinez@acme.com

<template>
  <ListBox aria-label="Large user list" class="demo-list-box-virtualized" selection-mode="single">
    <ListBoxItem v-for="user in users" :id="user.id" :key="user.id" :text-value="user.name">
      <div class="demo-list-box-user">
        <Label>{{ user.name }}</Label>
        <Description>{{ user.email }}</Description>
      </div>
      <ListBoxItemIndicator />
    </ListBoxItem>
  </ListBox>
</template>

<script setup lang="ts">
import { Description, Label, ListBox, ListBoxItem, ListBoxItemIndicator } from '@heroui-vue/vue'

const firstNames = [
  'Emma',
  'Liam',
  'Olivia',
  'Noah',
  'Ava',
  'James',
  'Sophia',
  'Oliver',
  'Isabella',
  'Lucas',
  'Mia',
  'Ethan',
  'Charlotte',
  'Mason',
  'Amelia',
  'Logan',
  'Harper',
  'Alexander',
  'Ella',
  'Benjamin',
]
const lastNames = [
  'Smith',
  'Johnson',
  'Williams',
  'Brown',
  'Jones',
  'Garcia',
  'Miller',
  'Davis',
  'Rodriguez',
  'Martinez',
  'Anderson',
  'Taylor',
  'Thomas',
  'Jackson',
  'White',
  'Harris',
  'Clark',
  'Lewis',
  'Robinson',
  'Walker',
]
const users = Array.from({ length: 1000 }, (_, index) => {
  const firstName = firstNames[index % firstNames.length]
  const lastName = lastNames[Math.floor(index / firstNames.length) % lastNames.length]
  const name = `${firstName} ${lastName}`

  return {
    email: `${firstName.toLowerCase()}.${lastName.toLowerCase()}@acme.com`,
    id: index + 1,
    name,
  }
})
</script>

<style lang="less">
.demo-list-box-virtualized {
  width: 18.75rem;
  height: 25rem;
  overflow-y: auto;
}

.demo-list-box-user {
  display: flex;
  flex-direction: column;
}
</style>

Styling

Use component props for selection, disabled state, and variants first. Demo-only layout classes are kept in the demo source so the preview code remains complete.

API

ListBox Props

PropTypeDefaultDescription
ariaLabelstringundefinedAccessibility label for the listbox
selectionMode'none' | 'single' | 'multiple''single'Selection behavior
selectedKeysArray<string | number>undefinedControlled selected keys
defaultSelectedKeysArray<string | number>[]Initial selected keys
disabledKeysArray<string | number>[]Disabled item keys
disabled / isDisabledbooleanfalseDisables the whole listbox
variant'default' | 'danger''default'Visual variant inherited by items

ListBoxItem Props

PropTypeDefaultDescription
id / valuestring | numberundefinedUnique item key
textValuestringundefinedText value used for accessible naming
disabled / isDisabledbooleanfalseDisables the item
variant'default' | 'danger'inheritedItem variant

Events

EventPayloadDescription
update:selectedKeysArray<string | number>Emitted when selection changes
selection-changeArray<string | number>Emitted when selection changes
actionstring | numberEmitted when an enabled item is activated

Released under the Apache-2.0 License.