Skip to content
Star

PxAvatarSelect

A searchable select dropdown where each option displays a PxAvatar with the user's initials alongside their name. Ideal for user/member selection fields.

Usage

Demo
Select a team member...

Props

PropTypeDefaultDescription
modelValueunknownnullCurrently selected value(s). Use with v-model.
optionsrequiredT[]Array of option objects.
labelstring'name'Property name read from each option for its display text and avatar initials.
placeholderstring''Dropdown placeholder.
disabledbooleanfalseDisables the select.
multiplebooleanfalseAllows selecting more than one option.
clearablebooleantrueShows a button to clear the current selection.
selectClassstring(preset Tailwind classes)Custom classes for the select input.
reduce(option: T) => unknownoption => option.id ?? option.valueExtracts the value stored in modelValue from a selected option.

Emits

EventPayloadDescription
update:modelValueunknownEmitted on selection change.

Built with VitePress