Fallback
When the src
prop is undefined, default children will show. This can be used for initials, icons, or fallback images.
<Avatar>SK</Avatar>
<Avatar>💀</Avatar>
API Reference
AvatarProps
Name | Type | Description |
---|---|---|
src | string | Set avatar image source URL. |
alt | string | Set avatar image Alt text. |
filter | string | Set avatar image filter name. such as "#Apollo". |
base | string | Set base styles. |
background | string | Set background styles. |
size | string | Set size styles. |
font | string | Set font styles. |
border | string | Set border styles. |
rounded | string | Set border radius styles. |
shadow | string | Set shadow styles. |
classes | string | Provide arbitrary CSS classes. |
imageBase | string | Set avatar image base styles. |
imageClasses | string | Provide avatar image arbitrary CSS classes. |
children |
AvatarProps
node_modules/@skeletonlabs/skeleton-react/src/components/Avatar/types.ts
{ "src": { "description": "Set avatar image source URL.", "type": "string" }, "alt": { "description": "Set avatar image Alt text.", "type": "string" }, "filter": { "description": "Set avatar image filter name. such as \"#Apollo\".", "type": "string" }, "base": { "description": "Set base styles.", "type": "string" }, "background": { "description": "Set background styles.", "type": "string" }, "size": { "description": "Set size styles.", "type": "string" }, "font": { "description": "Set font styles.", "type": "string" }, "border": { "description": "Set border styles.", "type": "string" }, "rounded": { "description": "Set border radius styles.", "type": "string" }, "shadow": { "description": "Set shadow styles.", "type": "string" }, "classes": { "description": "Provide arbitrary CSS classes.", "type": "string" }, "imageBase": { "description": "Set avatar image base styles.", "type": "string" }, "imageClasses": { "description": "Provide avatar image arbitrary CSS classes.", "type": "string" }, "children": { "$ref": "#/definitions/React.ReactNode" } }