
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-component-bytesize-icons
Advanced tools
This package is yet another React component library for bytesize-icons. bytesize-icons is a SVG based, nice and reasonable icon set.
$ npm install --save react-component-bytesize-icons react react-dom
import * as React from 'react';
import Icon from 'react-component-bytesize-icons';
const Message = (props) => (
<div>
Search icon: <Icon name="search"/>
Thin large icon: <Icon name="book" thickness="thin" size="larger"/>
Thick small icon: <Icon name="flag" thickness="bold" size="small"/>
</div>
);
The name property is corresponding to described icons in [bytesize-icons repo's README][].
You can also see the bottom section of this README to know all available icons.
<Icon/> Component| Property | Description | Default |
|---|---|---|
name | Name of icon (required). | N/A |
thickness | Line thickness (optional). | regular |
size | Size of icon (optional). | regular |
thickness takes one of ultra-light, thin, light, regular, medium, bold or heavy.
size takes one of small, regular, larger or largest. small is 24px, regular is 32px, larger is 48px and largest is 64px.
With these size, icons are rendered the best. You should choose one from them and tweak the size with CSS.
You can also see type definition file for more detail.
There is already a React component package for bytesize-icons but I created this for the below points
react-bytesize-icons directly shows <svg> element's props such as height or strokeWidth.
It means that user must calculate icons' stroke width by its size and thickness.
react-component-bytesize-icons calculates the best strokeWidth, height and width attributes
of <svg> from thickness prop and size prop.
I didn't directly write index.tsx. It's generated with Ruby script. It generates TypeScript code by referring bytesize-icons repository directly.
This package is checked at 3 stages.
Of course you can use this package in safe way using TypeScript because this package contains its type definitions. Type definitions are also tested.
This package depends on no package.
| Icon | React Component |
|---|---|
<Icon name="activity"/> | |
<Icon name="alert"/> | |
<Icon name="archive"/> | |
<Icon name="arrow-bottom"/> | |
<Icon name="arrow-left"/> | |
<Icon name="arrow-right"/> | |
<Icon name="arrow-top"/> | |
<Icon name="backwards"/> | |
<Icon name="bag"/> | |
<Icon name="ban"/> | |
<Icon name="bell"/> | |
<Icon name="book"/> | |
<Icon name="bookmark"/> | |
<Icon name="calendar"/> | |
<Icon name="camera"/> | |
<Icon name="caret-bottom"/> | |
<Icon name="caret-left"/> | |
<Icon name="caret-right"/> | |
<Icon name="caret-top"/> | |
<Icon name="cart"/> | |
<Icon name="checkmark"/> | |
<Icon name="chevron-bottom"/> | |
<Icon name="chevron-left"/> | |
<Icon name="chevron-right"/> | |
<Icon name="chevron-top"/> | |
<Icon name="clipboard"/> | |
<Icon name="clock"/> | |
<Icon name="close"/> | |
<Icon name="code"/> | |
<Icon name="compose"/> | |
<Icon name="creditcard"/> | |
<Icon name="desktop"/> | |
<Icon name="download"/> | |
<Icon name="edit"/> | |
<Icon name="eject"/> | |
<Icon name="ellipsis-horizontal"/> | |
<Icon name="ellipsis-vertical"/> | |
<Icon name="end"/> | |
<Icon name="export"/> | |
<Icon name="external"/> | |
<Icon name="eye"/> | |
<Icon name="feed"/> | |
<Icon name="file"/> | |
<Icon name="filter"/> | |
<Icon name="flag"/> | |
<Icon name="folder-open"/> | |
<Icon name="folder"/> | |
<Icon name="forwards"/> | |
<Icon name="fullscreen-exit"/> | |
<Icon name="fullscreen"/> | |
<Icon name="gift"/> | |
<Icon name="github"/> | |
<Icon name="heart"/> | |
<Icon name="home"/> | |
<Icon name="import"/> | |
<Icon name="inbox"/> | |
<Icon name="info"/> | |
<Icon name="lightning"/> | |
<Icon name="link"/> | |
<Icon name="location"/> | |
<Icon name="lock"/> | |
<Icon name="mail"/> | |
<Icon name="menu"/> | |
<Icon name="msg"/> | |
<Icon name="microphone"/> | |
<Icon name="minus"/> | |
<Icon name="mobile"/> | |
<Icon name="moon"/> | |
<Icon name="move"/> | |
<Icon name="music"/> | |
<Icon name="mute"/> | |
<Icon name="options"/> | |
<Icon name="paperclip"/> | |
<Icon name="pause"/> | |
<Icon name="photo"/> | |
<Icon name="play"/> | |
<Icon name="plus"/> | |
<Icon name="portfolio"/> | |
<Icon name="print"/> | |
<Icon name="reload"/> | |
<Icon name="reply"/> | |
<Icon name="search"/> | |
<Icon name="send"/> | |
<Icon name="settings"/> | |
<Icon name="sign-in"/> | |
<Icon name="sign-out"/> | |
<Icon name="star"/> | |
<Icon name="start"/> | |
<Icon name="tag"/> | |
<Icon name="telephone"/> | |
<Icon name="trash"/> | |
<Icon name="twitter"/> | |
<Icon name="unlock"/> | |
<Icon name="upload"/> | |
<Icon name="user"/> | |
<Icon name="video"/> | |
<Icon name="volume"/> | |
<Icon name="work"/> | |
<Icon name="zoom-in"/> | |
<Icon name="zoom-out"/> | |
<Icon name="zoom-reset"/> |
# Install development dependencies
$ npm install
# Generate index.tsx and compile it
$ npm run gen
# Check code style
$ npm run lint
# Run tests
$ npm test
FAQs
One react component for bytesize icons
We found that react-component-bytesize-icons demonstrated a not healthy version release cadence and project activity because the last version was released 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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.