Socket
Socket
Sign inDemoInstall

@planningcenter/avatar

Package Overview
Dependencies
6
Maintainers
10
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @planningcenter/avatar

A circular image representing one person.


Version published
Weekly downloads
206
decreased by-37%
Maintainers
10
Install size
79.3 kB
Created
Weekly downloads
 

Readme

Source

@planningcenter/avatar

A circular image representing one person

Usage

npm -i @planningcenter/avatar

  • NPM
  • UNPKG

React

import Avatar from "@planningcenter/avatar";
import "@planningcenter/avatar.css";

<Avatar
  src="path/to/avatar.png"
  alt="some avatar"
  size={4}
  inset={true}
/>;

CSS

First, link the stylesheet, relative to your platform.

<span class="Avatar Avatar--size_4 Avatar--inset_true">
  <img src="path/to/avatar.png" alt="some avatar" />
</span>

Properties

size: string | number

Controls size in 8px increments.

values: 3, 4, 5, 6, 7, 8, 9, "20px", "profile"

inset: boolean

Insets the component

Theming with CSS Custom Properties

:root {
  --planningcenter-avatar-inset-color: white;
}

Specification

Definition

An image representing one person.

Treatment

  • Shape: circle
  • Dimensions: height == width
  • Border: optional
    • excluded: 20px
    • size: .5 * (absolute-avatar-size / 8px) (rounded up for better browser support)
    • scale: _roundUp(size _ .05)*
    • min: 2px
    • max: 5px
    • position: inside
    • color: variable (default: white)

Size

Absolute height/width must be a multiple of 8px, with a single exception for 20px.

Applications may choose to implement a subset of standard sizes.

standard sizes:
  • 20px
  • 24px
  • 32px
  • 40px
  • 48px
  • 56px
  • 64px
  • 72px

FAQs

Last updated on 24 Oct 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc