smrt
Open the smrt source on GitHub Switch to dark color scheme
← All UI components

Membership and permissions

RoleSelector

A trigger button and a single-select listbox of roles.

Public export

typescript
import { RoleSelector } from '@happyvertical/smrt-ui';
Import path
@happyvertical/smrt-ui
Props
6
Props described
6 of 6
Bindable state
0
Callback events
1
Verified release
0.62.10

Props

NameTypeRequiredDescription
rolesRole[]YesThe available roles to choose from.
valuestring | nullNoThe currently selected role ID.
onchange(roleId: string) => voidYesFired when a role is selected, passed the role ID.
disabledbooleanNoBlocks opening the role list.
placeholderstringNoPlaceholder text shown when no role is selected.
showDescriptionbooleanNoShows role descriptions in the dropdown options.

Bindable state

This component has no bindable public state.

Callback events

  • onchange(roleId: string) => void

Examples and explanation