Avatar

An image element with a fallback for representing the user.

CN

Installation

bash
npx shadcn-vue@latest add avatar

Usage

vue
<script setup lang="ts">
import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar'
</script>

<template>
  <Avatar>
    <AvatarImage src="https://github.com/unovue.png" alt="@unovue" />
    <AvatarFallback>CN</AvatarFallback>
  </Avatar>
</template>
Edit this page on GitHub