Skip to main content
Version: v9

ion-avatar

shadow

Avatars are circular components that usually wrap an image or icon. They can be used to represent a person or an object.

Avatars can be used by themselves or inside of any element. If placed inside of an ion-chip or ion-item, the avatar will resize to fit the parent component. To position an avatar on the left or right side of an item, set the slot to start or end, respectively.

Basic Usage

Chip Avatar

Item Avatar

Theming

CSS Custom Properties

Properties

disabled

DescriptionIf true, the user cannot interact with the avatar.
Attributedisabled
Typeboolean
Defaultfalse

mode

DescriptionThe mode determines the platform behaviors of the component.

This is a virtual property that is set once during initialization and will not update if you change its value after the initial render.
Attributemode
Type"ios" | "md"
Defaultundefined

shape

DescriptionSet to "soft" for an avatar with slightly rounded corners, "round" for an avatar with fully rounded corners, or "rectangular" for an avatar without rounded corners.

Defaults to "round" for the ionic theme, undefined for all other themes.
Attributeshape
Type"rectangular" | "round" | "soft" | undefined
Defaultundefined

size

DescriptionSet to "xxsmall" for the smallest size. Set to "xsmall" for a very small size. Set to "small" for a compact size. Set to "medium" for the default height and width. Set to "large" for a larger size. Set to "xlarge" for the largest dimensions.

Defaults to "medium" for the ionic theme, undefined for all other themes.
Attributesize
Type"large" | "medium" | "small" | "xlarge" | "xsmall" | "xxsmall" | undefined
Defaultundefined

theme

DescriptionThe theme determines the visual appearance of the component.

This is a virtual property that is set once during initialization and will not update if you change its value after the initial render.
Attributetheme
Type"ios" | "md" | "ionic"
Defaultundefined

Events

No events available for this component.

Methods

No public methods available for this component.

CSS Shadow Parts

No CSS shadow parts available for this component.

CSS Custom Properties

NameDescription
--border-radiusBorder radius of the avatar and inner image

Slots

No slots available for this component.