
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
formidable-oss-badges
Advanced tools
Badges for Formidable Open Source Projects
yarn add formidable-oss-badges
or npm install formidable-oss-badges
import { ProjectBadge, IconBadge } from "formidable-oss-badges";
<ProjectBadge />
and/or <IconBadge></IconBadge>
component as directed belowThe <ProjectBadge />
component takes five, optional, props:
Prop | Type | Description | Example |
---|---|---|---|
color | String (hex/RGB) | Base color of the badge | "#FF00FF" |
abbreviation | String | Short representation of the name. Large font. Typically one uppercase letter, one lowercase. | "Em" |
description | String | Title or brief description. Smaller text, displayed in all-caps. | "Enzyme Matchers" |
number | Number or String | Number that appears at the top of the badge | 9 or "09" |
className | String | Class to apply directly to the SVG | "project-badge" |
It is recommended to at least include the color
, description
and abbreviation
props.
Will accept any svg child (we recommend to use an <image/>
with an embedded png, svg or lossless image format of your choice. See example 5).
Presence of a child will cause the component to ignore any abbreviation
prop.
You will need to position the child yourself.
e.g:
<image
x="14%"
y="20%"
/>
<IconBadge />
only accepts a color prop.
Prop | Type | Description | Example |
---|---|---|---|
color | String (hex/RGB) | Base color of the badge | "#FF00FF" |
Like ProjectBadge
, will accept any svg child (we recommend to use an <image/>
with an embedded png, svg or lossless image format of your choice. See example 4).
This badge should always be given a child.
You will need to position the child yourself.
1:
<ProjectBadge color="#89E" abbreviation="No" description="Number" />
2:
<ProjectBadge
color="#E48055"
abbreviation="Em"
description="Enzyme Matchers"
number="09"
/>
3:
<ProjectBadge />
4:
IconBadge which just shows an outline:
<IconBadge color="#89E">
<image
x="14%"
y="20%"
width="50%"
href="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/512px-React-icon.svg.png"
/>
</IconBadge>
5:
ProjectBadge with svg child:
<ProjectBadge abbreviation="R" description="React" number="09" color="#90dafa">
<image
x="14%"
y="20%"
width="50%"
href="https://upload.wikimedia.org/wikipedia/commons/thumb/a/a7/React-icon.svg/512px-React-icon.svg.png"
/>
</ProjectBadge>
To try out the badge components locally:
git clone
this repocd formidable-oss-badges
yarn && yarn build && yarn link
or npm i && npm run build && npm link
cd examples
yarn link "formidable-oss-badges"
or npm link "formidable-oss-badges"
yarn && yarn start
or npm i && npm start
to run a basic React app prepopulated with basic examplesYou can then edit examples/src/App.js
, either by returning the components directly, or by adding an object with the props you would like to trial in the dataForExamples
array.
Note that this array is currently just used for passing props into <ProjectBadge />
and not for passing children or for rendering <IconBadge />
.
FAQs
Badges for Formidable OSS
The npm package formidable-oss-badges receives a total of 25 weekly downloads. As such, formidable-oss-badges popularity was classified as not popular.
We found that formidable-oss-badges demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.