Forms
FormUploadAvatar
Circular avatar upload with crop preview.
Forms
Enhanced form components for uploads, rich text editing, and search inputs.
Components
<XAFormUploadAvatar />
Circular avatar upload with crop preview.
<XAFormUploadAvatar v-model="avatarUrl" :upload-url="'/api/upload/avatar'" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
modelValue | string | '' | Current avatar URL via v-model; updated after a successful upload |
uploadUrl | string | required | POST endpoint that receives the avatar as multipart/form-data |
maxSizeMb | number | 2 | Maximum allowed file size in megabytes |
AI Context
component: XAFormUploadAvatar
package: "@xenterprises/nuxt-x-app"
category: Form
use-when: Profile settings, user profile editing — circular avatar upload with crop preview
upload-pattern: requires upload-url prop pointing to POST endpoint, emits update:modelValue with the uploaded avatar URL
