Theme

npm_versionnpm Paragon package page

A button that contains the user’s Avatar.

Basic Usage

Any Paragon component or export may be added to the code example.

With Dropdown

Any Paragon component or export may be added to the code example.

Props set on Dropdown.Toggle get passed through to the "as" component

Any Paragon component or export may be added to the code example.

No label

For use in mobile viewports or constrained views.

Any Paragon component or export may be added to the code example.

CSS overrides can be applied to this component through the .btn-avatar class name.

Theme Variables (SCSS)#

$avatar-button-padding-left: .25em !default;
$avatar-button-padding-left-sm: .25em !default;
$avatar-button-padding-left-lg: .25em !default;

Props API#

AvatarButton Props API
  • children string

    The button text

  • className string

    A class name to append to the button

  • showLabel bool

    Show the label or only the avatar

    Defaulttrue
  • size enum'sm' | 'md' | 'lg'

    The button size

    Default'md'
  • src string

    Image src of the avatar image

  • variant string

    The button style variant to use

    Default'tertiary'

Usage Insights#

AvatarButton

Project NameParagon VersionInstance Count
frontend-app-admin-portal21.13.11
frontend-app-learner-dashboard22.4.01
frontend-app-learner-portal-enterprise21.13.12
frontend-app-publisher20.46.31
frontend-app-support-tools20.46.02
frontend-component-header-edx21.11.42
prospectus20.46.21