MDC Pug3.0.0-beta.3
codeforumbug_report

Examples

Text

codecode_off
P
+mdc-avatar('P')
// or
// +mdc-avatar(text='P')

Icon

codecode_off
star
+mdc-avatar(icon='star')

Image

codecode_off
+mdc-avatar(image='https://placeimg.com/128/128/people')
 
// or
// +mdc-avatar(
//     image={
//         src: 'https://placeimg.com/128/128/people',
//         alt: ''
//     }
// )

Sizes

codecode_off
+mdc-avatar(
    image='https://placeimg.com/128/128/people'
    size='small'
)
+mdc-avatar(
    image='https://placeimg.com/128/128/people'
    size='medium'
)
+mdc-avatar(
    image='https://placeimg.com/128/128/people'
    size='large'
)
 
// or
// +mdc-avatar(
//     image='https://placeimg.com/128/128/people'
//     small
// )
// +mdc-avatar(
//     image='https://placeimg.com/128/128/people'
//     medium
// )
// +mdc-avatar(
//     image='https://placeimg.com/128/128/people'
//     large
// )

Arguments

PositionTypeDescription
1stringThe text content.

Attributes

NameTypeDescription
textstringThe text content.
iconstringThe name of the icon.
imagestring | objectThe source of the image or an object with image attributes.
sizestringThe size of the avatar. Valid values are small, medium, large.
smallbooleanShorthand for size='small'.
mediumbooleanShorthand for size='medium'.
largebooleanShorthand for size='large'.