Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@patternfly/pfe-avatar
Advanced tools
pfe-avatar
is an element for displaying a user's avatar image. If the user in question has provided a custom avatar, provide it and it will be displayed. If they don't, a nice colored pattern will be generated based on their name. A specific name will always generate the same pattern, so users' avatars will stay static without the need for storing their generated image.
<pfe-avatar pfe-name="Eleanore Stillwagon"></pfe-avatar>
<pfe-avatar pfe-name="Libbie Koscinski" pfe-shape="rounded" pfe-pattern="squares"></pfe-avatar>
<pfe-avatar pfe-name="Blanca Rohloff" pfe-pattern="triangles"></pfe-avatar>
<pfe-avatar pfe-name="Edwardo Lindsey" pfe-src="https://clayto.com/2014/03/rgb-webgl-color-cube/colorcube.jpg"></pfe-avatar>
The user's name, either given name and family name, or username. When displaying a pattern, the name will be used to seed the pattern generator.
The URL to the user's custom avatar image. It will be displayed instead of a random pattern.
The type of pattern to display. Currently supported values are "squares"
and "triangles"
.
squares | triangles |
---|---|
The shape of the avatar itself. Supported values are "square"
(default), "rounded"
, and "circle"
.
Theme Var Hook | Description | Default |
---|---|---|
--pfe-avatar--colors | A space-delimited list of colors to use for generated patterns. Only hex values are supported, ex: #fc0 or #0fcb41 . Any number of colors may be provided. | #3B0083 #f0ab00 #007a87 #00b9e4 #92d400 |
npm run test
npm run build
From the PFElements root directory, run:
npm start
Avatar (and all PFElements) use Prettier to auto-format JS and JSON. The style rules get applied when you commit a change. If you choose to, you can integrate your editor with Prettier to have the style rules applied on every save.
FAQs
Avatar for PatternFly Elements
The npm package @patternfly/pfe-avatar receives a total of 318 weekly downloads. As such, @patternfly/pfe-avatar popularity was classified as not popular.
We found that @patternfly/pfe-avatar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 16 open source maintainers 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.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.