Velvet Thunder

Avatar

Variants

JP
JP
JP
<DemoSpaceX>
  <VelvetAvatar @variant="emerald" @name="Jake Peralta" />
  <VelvetAvatar @variant="amber" @name="Jake Peralta" />
  <VelvetAvatar @variant="rose" @name="Jake Peralta" />
</DemoSpaceX>

Sizes

JP
JP
JP
<DemoSpaceX>
  <VelvetAvatar @name="Jake Peralta" @size="sm" />
  <VelvetAvatar @name="Jake Peralta" @size="md" />
  <VelvetAvatar @name="Jake Peralta" @size="lg" />
</DemoSpaceX>

Round

JP
<VelvetAvatar @isRound={{true}} @name="Jake Peralta" />

Images

<VelvetAvatar @src="https://avatars.githubusercontent.com/u/7403183" />

Initials

JP
<VelvetAvatar @initials="JP" />

No User Data

?
<VelvetAvatar />

Arguments

NameDescriptionTypeDefault Value
@initialsThe initials of the user.string""
@isRoundIndicate if the avatar is round.booleanfalse
@nameThe name of the user.string""
@sizeThe size of the avatar."sm" | "md" | "lg""md"
@srcThe source of the image.string""
@variantThe appearance of the avatar.string | "primary""primary"

The order to determine what to display is as follows:

  1. If the @src argument is provided, the image will be displayed
  2. If the @src argument is not provided, the @name argument will be used to determine the initials
  3. If the @name argument is not provided, the @initials argument will be displayed
  4. If the @initials argument is not provided, a question mark will be displayed as a last resort
Getting Started
Button