Skip to content

ListBox

A list of options to select or act on, HeroUI's on Kobalte's.

Solidtype_heroui.List_box is Kobalte’s Listbox, with the classes HeroUI’s own listboxVariants, listboxItemVariants and listboxSectionVariants give. HeroUI’s Label, Description, Header and Separator go inside its options and sections, as in React.

B
bob@heroui.com
F
fred@heroui.com
M
martha@heroui.com
list_box_usage.mlx
module Avatar = Solidtype_heroui.Avatar
module Description = Solidtype_heroui.Description
module Label = Solidtype_heroui.Label
module List_box = Solidtype_heroui.List_box
let make () =
<List_box aria_label="Users" class_="w-[220px]" selection_mode=`single>
<List_box.Item id="1" text_value="Bob">
<Avatar size=`sm>
<Avatar.Image
alt="Bob"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg"
/>
<Avatar.Fallback>"B"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Bob"</Label> <Description>"bob@heroui.com"</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>
<List_box.Item id="2" text_value="Fred">
<Avatar size=`sm>
<Avatar.Image
alt="Fred"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg"
/>
<Avatar.Fallback>"F"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Fred"</Label> <Description>"fred@heroui.com"</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>
<List_box.Item id="3" text_value="Martha">
<Avatar size=`sm>
<Avatar.Image
alt="Martha"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg"
/>
<Avatar.Fallback>"M"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Martha"</Label> <Description>"martha@heroui.com"</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>
</List_box>
<List_box aria_label="...">
<List_box.Item id="...">
<Label>...</Label>
<Description>...</Description>
<List_box.Item_indicator />
</List_box.Item>
<Separator />
<List_box.Section>
<Header>...</Header>
<List_box.Item id="..." />
</List_box.Section>
</List_box>
Create a new file
⌘N
Make changes
⌘E
Move to trash
⌘⇧D
list_box_with_disabled_items.mlx
module Description = Solidtype_heroui.Description
module Header = Solidtype_heroui.Header
module Kbd = Solidtype_heroui.Kbd
module Label = Solidtype_heroui.Label
module List_box = Solidtype_heroui.List_box
module Separator = Solidtype_heroui.Separator
module Surface = Solidtype_heroui.Surface
let make () =
<Surface class_="w-[256px] rounded-3xl shadow-surface">
<List_box
aria_label="File actions"
class_="w-full p-2"
disabled_keys=(fun () -> [| "delete-file" |])
selection_mode=`none
on_action=(fun (_ : string) -> ())>
<List_box.Section>
<Header>"Actions"</Header>
<List_box.Item id="new-file" text_value="New file">
<div class_="flex h-8 items-start justify-center pt-px">
<Gravity.Square_plus class_="size-4 shrink-0 text-muted" />
</div>
<div class_="flex flex-col">
<Label>"New file"</Label>
<Description>"Create a new file"</Description>
</div>
<Kbd class_="ms-auto" variant=`light>
<Kbd.Abbr key_value=`command /> <Kbd.Content>"N"</Kbd.Content>
</Kbd>
</List_box.Item>
<List_box.Item id="edit-file" text_value="Edit file">
<div class_="flex h-8 items-start justify-center pt-px">
<Gravity.Pencil class_="size-4 shrink-0 text-muted" />
</div>
<div class_="flex flex-col">
<Label>"Edit file"</Label> <Description>"Make changes"</Description>
</div>
<Kbd class_="ms-auto" variant=`light>
<Kbd.Abbr key_value=`command /> <Kbd.Content>"E"</Kbd.Content>
</Kbd>
</List_box.Item>
</List_box.Section>
<Separator />
<List_box.Section>
<Header>"Danger zone"</Header>
<List_box.Item
id="delete-file" text_value="Delete file" variant=`danger>
<div class_="flex h-8 items-start justify-center pt-px">
<Gravity.Trash_bin class_="size-4 shrink-0 text-danger" />
</div>
<div class_="flex flex-col">
<Label>"Delete file"</Label>
<Description>"Move to trash"</Description>
</div>
<Kbd class_="ms-auto" variant=`light>
<Kbd.Abbr key_value=`command />
<Kbd.Abbr key_value=`shift />
<Kbd.Content>"D"</Kbd.Content>
</Kbd>
</List_box.Item>
</List_box.Section>
</List_box>
</Surface>
Create a new file
⌘N
Make changes
⌘E
Move to trash
⌘⇧D
list_box_with_sections.mlx
module Description = Solidtype_heroui.Description
module Header = Solidtype_heroui.Header
module Kbd = Solidtype_heroui.Kbd
module Label = Solidtype_heroui.Label
module List_box = Solidtype_heroui.List_box
module Separator = Solidtype_heroui.Separator
module Surface = Solidtype_heroui.Surface
let make () =
<Surface class_="w-[256px] rounded-3xl shadow-surface">
<List_box
aria_label="File actions"
class_="w-full p-2"
selection_mode=`none
on_action=(fun (_ : string) -> ())>
<List_box.Section>
<Header>"Actions"</Header>
<List_box.Item id="new-file" text_value="New file">
<div class_="flex h-8 items-start justify-center pt-px">
<Gravity.Square_plus class_="size-4 shrink-0 text-muted" />
</div>
<div class_="flex flex-col">
<Label>"New file"</Label>
<Description>"Create a new file"</Description>
</div>
<Kbd class_="ms-auto" variant=`light>
<Kbd.Abbr key_value=`command /> <Kbd.Content>"N"</Kbd.Content>
</Kbd>
</List_box.Item>
<List_box.Item id="edit-file" text_value="Edit file">
<div class_="flex h-8 items-start justify-center pt-px">
<Gravity.Pencil class_="size-4 shrink-0 text-muted" />
</div>
<div class_="flex flex-col">
<Label>"Edit file"</Label> <Description>"Make changes"</Description>
</div>
<Kbd class_="ms-auto" variant=`light>
<Kbd.Abbr key_value=`command /> <Kbd.Content>"E"</Kbd.Content>
</Kbd>
</List_box.Item>
</List_box.Section>
<Separator />
<List_box.Section>
<Header>"Danger zone"</Header>
<List_box.Item
id="delete-file" text_value="Delete file" variant=`danger>
<div class_="flex h-8 items-start justify-center pt-px">
<Gravity.Trash_bin class_="size-4 shrink-0 text-danger" />
</div>
<div class_="flex flex-col">
<Label>"Delete file"</Label>
<Description>"Move to trash"</Description>
</div>
<Kbd class_="ms-auto" variant=`light>
<Kbd.Abbr key_value=`command />
<Kbd.Abbr key_value=`shift />
<Kbd.Content>"D"</Kbd.Content>
</Kbd>
</List_box.Item>
</List_box.Section>
</List_box>
</Surface>
B
bob@heroui.com
F
fred@heroui.com
M
martha@heroui.com
list_box_multi_select.mlx
module Avatar = Solidtype_heroui.Avatar
module Description = Solidtype_heroui.Description
module Label = Solidtype_heroui.Label
module List_box = Solidtype_heroui.List_box
module Surface = Solidtype_heroui.Surface
let make () =
<Surface class_="w-[256px] rounded-3xl shadow-surface">
<List_box aria_label="Users" selection_mode=`multiple>
<List_box.Item id="1" text_value="Bob">
<Avatar size=`sm>
<Avatar.Image
alt="Bob"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg"
/>
<Avatar.Fallback>"B"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Bob"</Label> <Description>"bob@heroui.com"</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>
<List_box.Item id="2" text_value="Fred">
<Avatar size=`sm>
<Avatar.Image
alt="Fred"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg"
/>
<Avatar.Fallback>"F"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Fred"</Label> <Description>"fred@heroui.com"</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>
<List_box.Item id="3" text_value="Martha">
<Avatar size=`sm>
<Avatar.Image
alt="Martha"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg"
/>
<Avatar.Fallback>"M"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Martha"</Label> <Description>"martha@heroui.com"</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>
</List_box>
</Surface>
B
bob@heroui.com
F
fred@heroui.com
M
martha@heroui.com

Selected: 1

list_box_controlled.mlx
module S = Solidtype.Solid
module Jsx = Solidtype.Jsx
module Avatar = Solidtype_heroui.Avatar
module Description = Solidtype_heroui.Description
module Label = Solidtype_heroui.Label
module List_box = Solidtype_heroui.List_box
module Surface = Solidtype_heroui.Surface
let make () =
let selected, set_selected = S.create_signal [| "1" |] in
<div class_="space-y-4">
<Surface class_="w-[256px] rounded-3xl shadow-surface">
<List_box
aria_label="Users"
selected_keys=(fun () -> S.get selected)
selection_mode=`multiple
on_selection_change=(S.set set_selected)>
<List_box.Item id="1" text_value="Bob">
<Avatar size=`sm>
<Avatar.Image
alt="Bob"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg"
/>
<Avatar.Fallback>"B"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Bob"</Label> <Description>"bob@heroui.com"</Description>
</div>
<List_box.Item_indicator>
(fun selected ->
if S.get selected then
<Gravity.Check class_="size-4 text-accent-soft-foreground" />
else Jsx.nothing)
</List_box.Item_indicator>
</List_box.Item>
<List_box.Item id="2" text_value="Fred">
<Avatar size=`sm>
<Avatar.Image
alt="Fred"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg"
/>
<Avatar.Fallback>"F"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Fred"</Label> <Description>"fred@heroui.com"</Description>
</div>
<List_box.Item_indicator>
(fun selected ->
if S.get selected then
<Gravity.Check class_="size-4 text-accent-soft-foreground" />
else Jsx.nothing)
</List_box.Item_indicator>
</List_box.Item>
<List_box.Item id="3" text_value="Martha">
<Avatar size=`sm>
<Avatar.Image
alt="Martha"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg"
/>
<Avatar.Fallback>"M"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Martha"</Label>
<Description>"martha@heroui.com"</Description>
</div>
<List_box.Item_indicator>
(fun selected ->
if S.get selected then
<Gravity.Check class_="size-4 text-accent-soft-foreground" />
else Jsx.nothing)
</List_box.Item_indicator>
</List_box.Item>
</List_box>
</Surface>
<p class_="text-sm text-muted">
"Selected: "
(fun () ->
Jsx.string
(match S.get selected with
| [||] -> "None"
| keys -> String.concat ", " (Array.to_list keys)))
</p>
</div>

HeroUI’s list is drawn by React Aria’s virtualizer, which draws only the options in view. The port draws every option, here a thousand: Kobalte’s list is told it is virtualized only so that the port may draw it.

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
list_box_virtualization.mlx
module Description = Solidtype_heroui.Description
module Label = Solidtype_heroui.Label
module List_box = Solidtype_heroui.List_box
type user = { id : string; name : string; email : string }
let first_names =
[|
"Emma";
"Liam";
"Olivia";
"Noah";
"Ava";
"James";
"Sophia";
"Oliver";
"Isabella";
"Lucas";
"Mia";
"Ethan";
"Charlotte";
"Mason";
"Amelia";
"Logan";
"Harper";
"Alexander";
"Ella";
"Benjamin";
|]
let last_names =
[|
"Smith";
"Johnson";
"Williams";
"Brown";
"Jones";
"Garcia";
"Miller";
"Davis";
"Rodriguez";
"Martinez";
"Anderson";
"Taylor";
"Thomas";
"Jackson";
"White";
"Harris";
"Clark";
"Lewis";
"Robinson";
"Walker";
|]
let generate_users n =
Array.init n (fun i ->
let first_name = first_names.(i mod Array.length first_names) in
let last_name =
last_names.(i / Array.length first_names mod Array.length last_names)
in
{
id = string_of_int (i + 1);
name = first_name ^ " " ^ last_name;
email =
String.lowercase_ascii first_name
^ "."
^ String.lowercase_ascii last_name
^ "@acme.com";
})
let make () =
let users = generate_users 1000 in
<List_box
aria_label="Virtualized list with 1000 items"
class_="h-[400px] w-[300px] overflow-y-auto">
<Solidtype.For each=(fun () -> users)>
(fun (user : user) _ ->
<List_box.Item id=(fun () -> user.id) text_value=(fun () -> user.name)>
<div class_="flex flex-col">
<Label>(fun () -> Solidtype.Jsx.string user.name)</Label>
<Description>
(fun () -> Solidtype.Jsx.string user.email)
</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>)
</Solidtype.For>
</List_box>
B
bob@heroui.com
F
fred@heroui.com
M
martha@heroui.com
list_box_custom_check_icon.mlx
module S = Solidtype.Solid
module Avatar = Solidtype_heroui.Avatar
module Description = Solidtype_heroui.Description
module Label = Solidtype_heroui.Label
module List_box = Solidtype_heroui.List_box
module Surface = Solidtype_heroui.Surface
let make () =
<Surface class_="w-[256px] rounded-3xl shadow-surface">
<List_box aria_label="Users" selection_mode=`multiple>
<List_box.Item id="1" text_value="Bob">
<Avatar size=`sm>
<Avatar.Image
alt="Bob"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg"
/>
<Avatar.Fallback>"B"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Bob"</Label> <Description>"bob@heroui.com"</Description>
</div>
<List_box.Item_indicator>
(fun selected ->
if S.get selected then
<Gravity.Check class_="size-4 text-accent-soft-foreground" />
else Solidtype.Jsx.nothing)
</List_box.Item_indicator>
</List_box.Item>
<List_box.Item id="2" text_value="Fred">
<Avatar size=`sm>
<Avatar.Image
alt="Fred"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg"
/>
<Avatar.Fallback>"F"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Fred"</Label> <Description>"fred@heroui.com"</Description>
</div>
<List_box.Item_indicator>
(fun selected ->
if S.get selected then
<Gravity.Check class_="size-4 text-accent-soft-foreground" />
else Solidtype.Jsx.nothing)
</List_box.Item_indicator>
</List_box.Item>
<List_box.Item id="3" text_value="Martha">
<Avatar size=`sm>
<Avatar.Image
alt="Martha"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/purple.jpg"
/>
<Avatar.Fallback>"M"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Martha"</Label> <Description>"martha@heroui.com"</Description>
</div>
<List_box.Item_indicator>
(fun selected ->
if S.get selected then
<Gravity.Check class_="size-4 text-accent-soft-foreground" />
else Solidtype.Jsx.nothing)
</List_box.Item_indicator>
</List_box.Item>
</List_box>
</Surface>

HeroUI’s Render Function example gives the list render, React’s way to swap the element it renders, which a Solid component has no need of.

class_ is added after HeroUI’s classes.

B
bob@heroui.com
F
fred@heroui.com
list_box_tailwind.mlx
module Avatar = Solidtype_heroui.Avatar
module Description = Solidtype_heroui.Description
module Label = Solidtype_heroui.Label
module List_box = Solidtype_heroui.List_box
let make () =
<List_box
aria_label="Assignee"
class_="w-56 rounded-xl border border-border/80 bg-surface p-1 shadow-sm"
selection_mode=`single>
<List_box.Item
class_="rounded-lg data-[focused=true]:bg-accent/10 \
data-[selected=true]:bg-accent/5"
id="1"
text_value="Bob">
<Avatar size=`sm>
<Avatar.Image
alt="Bob"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/blue.jpg"
/>
<Avatar.Fallback>"B"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Bob"</Label> <Description>"bob@heroui.com"</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>
<List_box.Item
class_="rounded-lg data-[focused=true]:bg-accent/10 \
data-[selected=true]:bg-accent/5"
id="2"
text_value="Fred">
<Avatar size=`sm>
<Avatar.Image
alt="Fred"
src="https://heroui-assets.nyc3.cdn.digitaloceanspaces.com/avatars/green.jpg"
/>
<Avatar.Fallback>"F"</Avatar.Fallback>
</Avatar>
<div class_="flex flex-col">
<Label>"Fred"</Label> <Description>"fred@heroui.com"</Description>
</div>
<List_box.Item_indicator />
</List_box.Item>
</List_box>

HeroUI’s classes are global, so a stylesheet restyles every one, as with HeroUI in React:

@layer components {
.list-box {
@apply rounded-lg border border-border bg-surface p-2;
}
.list-box-item {
@apply rounded px-2 py-1 cursor-pointer;
}
.list-box-item--danger {
@apply text-danger;
}
}
  • .list-box, .list-box--default, .list-box--danger
  • .list-box-item, .list-box-item--default, .list-box-item--danger, .list-box-item__indicator, and the indicator’s [data-slot="list-box-item-indicator--checkmark"]
  • .list-box-section, and .header for its title
  • [data-slot="separator"] within the list
  • Hover: [data-hovered="true"] on an option
  • Focus: :focus-visible or [data-focus-visible="true"], and [data-focused="true"] on the option with the focus
  • Pressed: [data-pressed="true"] on an option
  • Selected: [data-selected="true"] and [aria-selected="true"] on an option
  • Disabled: [data-disabled="true"] on an option
  • Selection: [data-selection-mode="single"] or "multiple" on the options

Kobalte’s list moves the focus between its options by the arrows and by what is typed, and selects one or many, as React Aria’s does. Kobalte’s list is made from its options as data, where HeroUI’s is written as elements: so each option, section and separator joins the list as it is made, in its order, and the list hands Kobalte its options alone and draws them in its sections, between its separators, as React Aria’s does. A section is a <section> with the role group, named by its header.

Kobalte counts each option’s place for a reader with aria-posinset and aria-setsize, which React Aria leaves to its list.

Each prop beside the name HeroUI’s React component gives it.

React solidtype Type Default Description
aria-label aria_label string Its name
selectionMode selection_mode `none | `single | `multiple `single How it selects
selectedKeys selected_keys string array The selected options’ ids, controlled
defaultSelectedKeys default_selected_keys string array The ids selected at first
onSelectionChange on_selection_change string array -> unit Told the ids selected as they change
disabledKeys disabled_keys string array The disabled options’ ids
onAction on_action string -> unit Told the id of an option pressed, with no selection
variant variant `default | `danger `default Its look
className class_ string Added after HeroUI’s classes
children children elements Its options, sections and separators
React solidtype Type Default Description
id id string Its id, which its list is told
textValue text_value string Its text, typed to reach it
isDisabled is_disabled bool false Whether it is disabled
variant variant `default | `danger `default Its look
className class_ string Added after HeroUI’s classes
children children elements What it shows
React solidtype Type Description
className class_ string Added after HeroUI’s classes
children children bool accessor -> element An indicator of its own, given whether its option is selected
React solidtype Type Description
className class_ string Added after HeroUI’s classes
children children elements Its header and options

Original HeroUI documentation: ListBox.

The same HeroUI ListBox twice, under the same props: in solidtype on the left, in React on the right. Below them, every attribute of each list: a marked row is one they disagree on, and a dimmed row is a framework’s own, which no style reads.

solidtype — OCaml, on Solid and Kobalte
React — TypeScript, on React Aria
attributesolidtypeReact