s-m-r-t
Open the s-m-r-t source on GitHub Switch to dark color scheme
← All UI components

Users · Components

UserList

List of users with selection support

Public export

typescript
import { UserList } from '@happyvertical/smrt-users/svelte';
Import path
@happyvertical/smrt-users/svelte
Props
6
Props described
6 of 6
Bindable state
0
Callback events
1
Verified release
0.44.0

Props

NameTypeRequiredDescription
usersUserWithProfile[]YesArray of users with profiles to display.
selectedIdstring | nullNoID of the currently selected user.
onselect(user: User) => voidNoCallback invoked with the user when a user is selected.
emptyMessagestringNoMessage displayed when the user list is empty.
emptySnippetNoOptional snippet to render a custom empty state.
loadingbooleanNoShows a loading spinner while users are being fetched.

Bindable state

This component has no bindable public state.

Callback events

  • onselect(user: User) => void

Examples and explanation