Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@react-md/avatar
Advanced tools
This package is used to avatars which are used to symbolize people or objects.
Create avatars to represent people or objects with images, icons, or text. Different theme colors can also be applied for icons or text.
npm install --save @react-md/avatar
It is generally recommended to also install the following packages since they work hand-in-hand with this package:
npm install --save @react-md/theme \
@react-md/typography \
@react-md/list \
@react-md/icon
You should check out the full documentation for live examples and more customization information, but an example usage is shown below.
One of the main use-cases will probably be to display a list of people with specific avatars with them:
import React from "react";
import { render } from "react-dom";
import { Avatar } from "@react-md/avatar";
import { List, ListItem } from "@react-md/list";
const people = [
{ name: "Logan Tyler", avatarUrl: "https://some-picture.com" },
{ name: "Trenton Berry", avatarUrl: "https://some-picture.com" },
{ name: "Damon Fletcher", avatarUrl: "https://some-picture.com" },
{ name: "Thomas Owen", avatarUrl: "https://some-picture.com" },
{ name: "Charity Henderson", avatarUrl: "https://some-picture.com" },
];
const App = () => (
<List>
{people.map(({ name, avatarUrl }, i) => (
<ListItem
id={`person-${i}`}
key={i}
leftAddon={<Avatar src={avatarUrl} alt={`${name}'s avatar'`} />}
leftAddonType="avatar"
>
{name}
</ListItem>
))}
</List>
);
render(<App />, document.getElementById("root"));
2.9.0 (2021-07-18)
This release is focused around the FileInput
component in the @react-md/form
package and implementing a useFileUpload
hook to handle uploading/previewing files in the browser. However, there is a notable change in this release for the form documentation since the demos have been split into the following pages:
FileInput
correctly center the icon when children aren't provided (3a6ab33)useLayoutNavigation
possible perf fix (3d65e4e)FileInput
automatically swaps button type to text if children exist (e5585e1)FormMessageCounter
component added to public API (1508812)useFileUpload
hook to upload files to the browser (efb3f2f), closes #1159useDropzone
hook (bc07a1f)useFileUpload
(49ce4d9)useFileUpload
(8f9002e)eslint
error after updating prettier
(75a9b0f)Select
Options Demo (367cc0d)FAQs
This package is used to avatars which are used to symbolize people or objects.
The npm package @react-md/avatar receives a total of 839 weekly downloads. As such, @react-md/avatar popularity was classified as not popular.
We found that @react-md/avatar demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.