Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fluentui/react-avatar

Package Overview
Dependencies
Maintainers
12
Versions
1023
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluentui/react-avatar

React components for building Microsoft web experiences.

  • 0.0.0-nightly-20240919-0407.1
  • Source
  • npm
  • Socket score

Version published
Maintainers
12
Created

What is @fluentui/react-avatar?

@fluentui/react-avatar is a React component library for creating and displaying avatars. It is part of the Fluent UI suite, which provides a consistent design language and components for building user interfaces. The package allows for customization and styling of avatars, including support for different sizes, shapes, and image sources.

What are @fluentui/react-avatar's main functionalities?

Basic Avatar

This feature allows you to create a basic avatar with a name. The avatar will display the initials of the name provided.

import { Avatar } from '@fluentui/react-avatar';

function BasicAvatar() {
  return <Avatar name="John Doe" />;
}

Avatar with Image

This feature allows you to create an avatar with a custom image. You can provide the image source URL to display a specific image.

import { Avatar } from '@fluentui/react-avatar';

function AvatarWithImage() {
  return <Avatar image={{ src: 'https://example.com/johndoe.jpg' }} name="John Doe" />;
}

Avatar Sizes

This feature allows you to create avatars of different sizes. You can specify the size in pixels to adjust the avatar's dimensions.

import { Avatar } from '@fluentui/react-avatar';

function AvatarSizes() {
  return (
    <div>
      <Avatar name="John Doe" size={24} />
      <Avatar name="John Doe" size={48} />
      <Avatar name="John Doe" size={72} />
    </div>
  );
}

Avatar Shapes

This feature allows you to create avatars with different shapes. You can choose between 'square' and 'circular' shapes.

import { Avatar } from '@fluentui/react-avatar';

function AvatarShapes() {
  return (
    <div>
      <Avatar name="John Doe" shape="square" />
      <Avatar name="John Doe" shape="circular" />
    </div>
  );
}

Other packages similar to @fluentui/react-avatar

FAQs

Package last updated on 19 Sep 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc