vdux-avatar

1.0.4 • Public • Published

avatar

js-standard-style

Circular avatar component

Installation

$ npm install vdux-avatar

Usage

Use it to render avatars.

<Avatar src='/images/cat.jpg' />

API - props

  • src - URL of the image
  • circle - Defaults to true. Makes it a circle.
  • size - Defaults to 32. Sets width/height simultaneously.

Theming

Avatar makes use of two themable properties, configurable in the context key baseTheme of vdux-base:

  • circularAvatars - Boolean. Defaults to true. If you set it to false, your avatars will default to being square.
  • avatarScale - Array of sizes. If you use this, you can set a scale for your avatars that your size prop may index into.

License

MIT

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.4
    0
    • latest

Version History

Package Sidebar

Install

npm i vdux-avatar

Weekly Downloads

3

Version

1.0.4

License

MIT

Last publish

Collaborators

  • ashaffer88