BlogPlaygroundOne

VAvatar API

ads via vuetify

Props
name
type
default
  | boolean
  | (Partial<{
      modelValue: boolean
      style: StyleValue
      location: Anchor | null
      rounded: string | number | boolean
      tile: boolean
      tag: string | JSXComponent
      floating: boolean
      bordered: boolean
      dot: boolean
      inline: boolean
      label: string
      transition:
        | string
        | boolean
        | (TransitionProps & { component?: Component | undefined })
        | null
    }> & {
      icon:
        | string
        | (string | [string, number])[]
        | (new () => any)
        | FunctionalComponent
      class: any
      height: string | number
      maxHeight: string | number
      maxWidth: string | number
      minHeight: string | number
      minWidth: string | number
      width: string | number
      theme: string
      color: string
      $children:
        | VNodeChild
        | { $stable: false | true }
        | (() => VNodeChild)
        | { default: () => VNodeChild; badge: () => VNodeChild }
      'v-slots': {
        default: false | (() => VNodeChild)
        badge: false | (() => VNodeChild)
      }
      'v-slot:default': false | (() => VNodeChild)
      key: PropertyKey
      ref: VNodeRef
      ref_for: false | true
      ref_key: string
      onVnodeBeforeMount: VNodeMountHook | VNodeMountHook[]
      onVnodeMounted: VNodeMountHook | VNodeMountHook[]
      onVnodeBeforeUpdate: VNodeUpdateHook | VNodeUpdateHook[]
      onVnodeUpdated: VNodeUpdateHook | VNodeUpdateHook[]
      onVnodeBeforeUnmount: VNodeMountHook | VNodeMountHook[]
      onVnodeUnmounted: VNodeMountHook | VNodeMountHook[]
      max: string | number
      content: string | number
      dotSize: string | number
      offsetX: string | number
      offsetY: string | number
      textColor: string
      'v-slot:badge': false | (() => VNodeChild)
    })
false

Wraps the avatar in a VBadge. When set to true, displays a dot badge. Accepts an object of VBadge props for further customization.

string | number | boolean
false

Applies utility border classes to the component. To use it, you need to omit the border- prefix, (for example use border-sm as border="sm"). Find a list of the built-in border classes on the borders page.

string
undefined

Applies specified color to the control - supports utility colors with or without text- prefix (for example success, purple or text-purple) or CSS color (#033 or rgba(255, 0, 0, 0.5)). Find a list of built-in classes on the colors page.

'default' | 'comfortable' | 'compact'
'default'

Adjusts the vertical height used by the component.

boolean
false

Applies margin at the start of the component.

  | string
  | (string | [string, number])[]
  | (new () => any)
  | FunctionalComponent
undefined

Apply a specific icon using the v-icon component.

string
undefined

Apply a specific image using v-img.

string | number | boolean
undefined

Designates the border-radius applied to the component. This can be 0, xs, sm, true, lg, xl, pill, circle, and shaped. Find more information on available border radius classes on the Border Radius page.

string | number
'default'

Sets the height and width of the component. Default unit is px. Can also use the following predefined sizes: x-small, small, default, large, and x-large.

boolean
false

Applies margin at the end of the component.

string | (new () => any) | FunctionalComponent
'div'

Specify a custom tag used on the root element.

string
undefined

Specify content text for the component.

string
undefined

Specify a theme for this component and all of its children.

boolean
false

Removes any applied border-radius from the component.

'text' | 'flat' | 'elevated' | 'tonal' | 'outlined' | 'plain'
'flat'

Applies a distinct style to the component.

Slots
never
never

Slot for custom badge content. When used, the badge dot mode is disabled.

The default Vue slot.

SASS Variables
name
default
rgb(var(--v-theme-surface))
(
  $avatar-border-color,
  $avatar-border-style,
  $avatar-border-width,
  $avatar-border-thin-width
)
settings.$border-color-root
map.get(settings.$rounded, 0)
settings.$border-style-root
thin
0
functions.theme-color('on-surface', var(--v-medium-emphasis-opacity))
('default': 0, 'comfortable': -1, 'compact': -2)
1
40px
normal
8px
8px
.62
variables.$border-radius-root
functions.map-deep-merge(
  (
    'height': $avatar-height,
    'width': $avatar-width
  ),
  $avatar-sizes
)
(
  $avatar-background,
  $avatar-color,
  $avatar-elevation,
  $avatar-plain-opacity,
  'v-avatar'
)
middle
40px