Components

Avatar Select

Avatar Select component with multiple variants and sizes.

Client Only

Installation

pnpm dlx @docyrus/cli add @docyrus/ui-avatar-select
UI Primitives(5 components)
npx shadcn@latest add button dialog input popover tabs

Usage

import {
  AvatarSelect
} from "@docyrus/ui/components/avatar-select";

<AvatarSelect
  editorDisplay="inline"
  value={...}
  disabled
  uploadImage={() => {}}
  onChange={() => {}}
  onCommit={() => {}}
/>

EditorDisplay

EditorDisplayDescription
inlineInline — space-y-3
popoverPopover — inline-flex

API Reference

PropTypeDefault
editorDisplay"inline" | "popover""default"
valuePartial<AvatarFieldValue> | null—
disabledboolean—
uploadImage(file: File) => Promise<AvatarImageValue>—
onChange(value: AvatarFieldValue, payload: Record<string, unknown>) => void—
onCommit(value: AvatarFieldValue, payload: Record<string, unknown>) => void—
classNamestring—

On this page