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

Users · Components

UserForm

Form for creating or editing users

Public export

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

Props

NameTypeRequiredDescription
userUser | nullNoOptional user account for editing; null creates a new user.
profileProfile | nullNoOptional user profile for editing.
onsubmit(data: { name: string; email: string; status: UserStatus; }) => voidYesCallback invoked with name, email, and status when form is submitted.
oncancel() => voidNoCallback invoked when the form is canceled.
loadingbooleanNoBlocks form input while user changes are being processed.

Bindable state

This component has no bindable public state.

Callback events

  • onsubmit(data: { name: string; email: string; status: UserStatus; }) => void
  • oncancel() => void

Examples and explanation