Gathering detailed insights and metrics for @emotion-icons/simple-icons
Gathering detailed insights and metrics for @emotion-icons/simple-icons
Gathering detailed insights and metrics for @emotion-icons/simple-icons
Gathering detailed insights and metrics for @emotion-icons/simple-icons
npm install @emotion-icons/simple-icons
@emotion-icons/octicons@3.27.0
Published on 25 Oct 2021
@emotion-icons/simple-icons@3.27.0
Published on 25 Oct 2021
emotion-icons@3.27.0
Published on 25 Oct 2021
@emotion-icons/bootstrap@3.27.0
Published on 25 Oct 2021
@emotion-icons/simple-icons@3.26.0
Published on 11 Oct 2021
emotion-icons@3.26.0
Published on 11 Oct 2021
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
73 Stars
848 Commits
7 Forks
2 Watching
97 Branches
6 Contributors
Updated on 03 Jul 2024
Minified
Minified + Gzipped
JavaScript (80.13%)
TypeScript (19.37%)
HTML (0.5%)
Cumulative downloads
Total Downloads
Last day
18%
229
Compared to previous day
Last week
-46.9%
1,248
Compared to previous week
Last month
19.1%
16,063
Compared to previous month
Last year
84.2%
115,351
Compared to previous year
2
3
emotion-icons
provides over 20,000 icons from the following icon packs as Emotion React Components, with full support for TypeScript types and tree-shaking / ES modules.
Do you use Styled Components?
Check out 💅 Styled Icons
Would you like plain SVGs?
Check out 🎛️ SVG Icons
You can install all the icon packs simultaneously:
yarn add emotion-icons
or
npm install emotion-icons --save
Alternatively you can install only the icon packs you need:
yarn add @emotion-icons/bootstrap
yarn add @emotion-icons/boxicons-logos
yarn add @emotion-icons/boxicons-regular
yarn add @emotion-icons/boxicons-solid
yarn add @emotion-icons/crypto
yarn add @emotion-icons/entypo
yarn add @emotion-icons/entypo-social
yarn add @emotion-icons/evaicons-outline
yarn add @emotion-icons/evaicons-solid
yarn add @emotion-icons/evil
yarn add @emotion-icons/fa-brands
yarn add @emotion-icons/fa-regular
yarn add @emotion-icons/fa-solid
yarn add @emotion-icons/feather
yarn add @emotion-icons/fluentui-system-filled
yarn add @emotion-icons/fluentui-system-regular
yarn add @emotion-icons/foundation
yarn add @emotion-icons/heroicons-outline
yarn add @emotion-icons/heroicons-solid
yarn add @emotion-icons/icomoon
yarn add @emotion-icons/ionicons-sharp
yarn add @emotion-icons/ionicons-solid
yarn add @emotion-icons/ionicons-outline
yarn add @emotion-icons/material
yarn add @emotion-icons/material-outlined
yarn add @emotion-icons/material-rounded
yarn add @emotion-icons/material-twotone
yarn add @emotion-icons/material-sharp
yarn add @emotion-icons/octicons
yarn add @emotion-icons/open-iconic
yarn add @emotion-icons/remix-fill
yarn add @emotion-icons/remix-line
yarn add @emotion-icons/simple-icons
yarn add @emotion-icons/typicons
yarn add @emotion-icons/zondicons
Finally, you will need to have installed a version of @emotion/react
and @emotion/styled
at least version 11.0.0 or newer, as emotion-icons
depends on @emotion/react
and @emotion/styled
as a peer dependency:
yarn add @emotion/react @emotion/styled
All icons are available for preview at the Icon Explorer.
The entire icon packs are available via the main import and sub-imports:
1import {material, octicons} from 'emotion-icons' 2 3import * as bootstrap from '@emotion-icons/bootstrap' 4import * as boxiconsLogos from '@emotion-icons/boxicons-logos' 5import * as boxiconsRegular from '@emotion-icons/boxicons-regular' 6import * as boxiconsSolid from '@emotion-icons/boxicons-solid' 7import * as crypto from '@emotion-icons/crypto' 8import * as entypo from '@emotion-icons/entypo' 9import * as entypoSocial from '@emotion-icons/entypo-social' 10import * as evaiconsOutline from '@emotion-icons/evaicons-outline' 11import * as evaiconsSolid from '@emotion-icons/evaicons-solid' 12import * as evil from '@emotion-icons/evil' 13import * as faBrands from '@emotion-icons/fa-brands' 14import * as faRegular from '@emotion-icons/fa-regular' 15import * as faSolid from '@emotion-icons/fa-solid' 16import * as feather from '@emotion-icons/feather' 17import * as fluentUISystemFilled from '@emotion-icons/fluentui-system-filled' 18import * as fluentUISystemRegular from '@emotion-icons/fluentui-system-regular' 19import * as foundation from '@emotion-icons/foundation' 20import * as heroiconsOutline from '@emotion-icons/heroicons-outline' 21import * as heroiconsSolid from '@emotion-icons/heroicons-solid' 22import * as icomoon from '@emotion-icons/icomoon' 23import * as ioniconsSharp from '@emotion-icons/ionicons-sharp' 24import * as ioniconsSolid from '@emotion-icons/ionicons-solid' 25import * as ioniconsOutline from '@emotion-icons/ionicons-outline' 26import * as material from '@emotion-icons/material' 27import * as materialOutlined from '@emotion-icons/material-outlined' 28import * as materialRounded from '@emotion-icons/material-rounded' 29import * as materialSharp from '@emotion-icons/material-sharp' 30import * as materialTwoTone from '@emotion-icons/material-twotone' 31import * as octicons from '@emotion-icons/octicons' 32import * as openIconic from '@emotion-icons/open-iconic' 33import * as remixFill from '@emotion-icons/remix-fill' 34import * as remixLine from '@emotion-icons/remix-line' 35import * as simpleIcons from '@emotion-icons/simple-icons' 36import * as typicons from '@emotion-icons/typicons' 37import * as zondicons from '@emotion-icons/zondicons'
You can also import just the icons you need:
1import React, {Fragment} from 'react' 2import {AccountCircle, Lock} from '@emotion-icons/material' 3 4const App = () => ( 5 <Fragment> 6 <AccountCircle /> 7 <Lock /> 8 </Fragment> 9)
For the individual icon pack packages (@emotion-icons/PACK
), the icons are also importable individually - this is not possible with the uber-emotion-icons
package containing all the packs:
1import React from 'react' 2import {Lock} from '@emotion-icons/material/Lock' 3 4const App = () => <Lock />
Emotion Icons accept all the valid props of an <svg />
element, in addition to the following custom props:
Prop | Required | Type | Description |
---|---|---|---|
size | optional | string, number | This is a convenience for setting both width and height to the same value |
title | optional | string | This sets the icon title and enables the standalone icon accessibility mode. See accessibility below for additional details |
Example
1import React from 'react' 2import {Lock} from '@emotion-icons/material' 3 4const App = () => <Lock size="48" title="Unlock account" />
Some icons natively have non-square dimensions - original dimensions are exported from the individual icon exports:
1import {LogoGithub, LogoGithubDimensions} from '@emotion-icons/octicons/LogoGithub' 2 3const App = () => <LogoGithub /> 4 5console.log(LogoGithubDimension) // {height: 16, width: 45}
Dimension exports are not available on the icon pack or index exports:
1import * as octicons from '@emotion-icons/octicons' 2import {octicons} from 'emotion-icons' 3 4// octicons contains only icon exports
All icons are exported as Emotion React Components, which means it is possible to utilize the Emotion API:
1import styled from '@emotion/styled' 2import {Lock} from '@emotion-icons/material' 3 4export const BlueLock = () => <Lock css="color: blue" /> 5 6export const RedLock = styled(Lock)` 7 color: red; 8 9 font-weight: ${(props) => (props.important ? 'bold' : 'normal')}; 10`
If you wish to style all icons at once, you can create a wrapper styled component that imparts a particular style to all icons contained within the wrapper by targeting the EmotionIconBase
component:
1import styled from '@emotion/styled' 2import {EmotionIconBase} from '@emotion-icons/emotion-icon' 3 4export const IconStyleWrapper = styled.div` 5 ${EmotionIconBase} { 6 color: red; 7 /* icon styles go here */ 8 } 9`
Emotion Icons have two different built-in "modes" for accessibility purposes. By default, icons are considered decorative, meaning the icon is just visual sugar and the surrounding content is sufficient for conveying meaning. This will set the aria-hidden
attribute on the resulting HTML to hide the icon from screen readers.
1// this icon 2<Lock /> 3 4// will result in 5<svg aria-hidden="true">...</svg>
Alternatively the icon could be used in standalone mode, meaning the icon itself should convey meaning. This mode is enabled by setting a title
prop - this is the text that will be read by a screen reader. This results in role
being set to img
and the addition of a <title>
element.
1// this icon 2<Lock title="Lock account" /> 3 4// will result in 5<svg role="img"><title>Lock account</title> ...</svg>
Since Style Icons accept all <svg>
element attributes as props, you are free to override these aria-*
attributes if you have a more complex use-case.
As this library provides direct access to the <svg>
element, you may wish to further wrap the icon for additional semantic meaning. For example, for a loading spinner:
1import styled from '@emotion/styled' 2import {Spinner} from '@emotion-icons/fa-solid/Spinner' 3 4const VisuallyHidden = styled.span` 5 border: 0 !important; 6 clip: rect(1px, 1px, 1px, 1px) !important; 7 height: 1px !important; 8 overflow: hidden !important; 9 padding-top: 0 !important; 10 padding-right: 0 !important; 11 padding-bottom: 0 !important; 12 padding-left: 0 !important; 13 position: absolute !important; 14 white-space: nowrap !important; 15 width: 1px !important; 16` 17 18<span title="Loading posts..." role="alert" aria-live="assertive"> 19 <Spinner /> 20 <VisuallyHidden>Loading posts...</VisuallyHidden> 21</span>
Emotion Icons supports automatic tree-shaking via the package.json
module
property from any of the import paths (icon pack, individual icon, etc.). Tree shaking has been tested with Create React App v2, Next.js, Rollup, and Webpack v4.
The icons of emotion-icons
are built using TypeScript and export type definitions. If you need a type to reference any styled icon, there is a EmotionIcon
type exported from the @emotion-icons/emotion-icon
package (recommended) or the emotion-icons/types
import:
1import styled from '@emotion/styled' 2 3// Recommended: 4import {EmotionIcon} from '@emotion-icons/emotion-icon' 5// Alternatively: 6import {EmotionIcon} from 'emotion-icons/types' 7 8interface Props { 9 icon: EmotionIcon 10}
NOTE: you should ensure that the version of @types/react
in your project is at least 16.8.14
or greater. That version of the React types package added support for ARIA attributes on SVG elements, which Emotion Icons uses.
If you have any ideas for improvements to the TypeScript typing, please open an issue or PR!
Contributions are welcome! Feel free to open an issue or a pull request and participate at whatever level you would like.
The MIT License - see LICENSE
.
The Bootstrap icons are licensed under the MIT License.
The Boxicons are licensed under the CC BY 4.0 License.
The Cryptocurrency icons are licensed under the CC0 1.0 Universal License.
The Entypo icons are licensed under the CC BY-SA 4.0 License.
The Eva Icons are licensed under the MIT License.
The Evil Icons are licensed under the MIT License.
The Font Awesome icons are licensed under the CC BY 4.0 License.
The Feather icons are licensed under the MIT License.
The FluentUI System icons are licensed under the MIT License.
The Foundation icons are licensed under the MIT License.
The Heroicons are licensed under the MIT License.
The Icomoon icons are dual licensed under GPL / CC BY 4.0 License.
The Ionicons are licensed under the MIT License.
The Material Design icons are licensed under the Apache License Version 2.0.
The Octicons are licensed under the MIT License.
The Open Iconic icons are licensed under the MIT License.
The Remix icons are licensed under the Apache License 2.0.
The Simple Icons are licensed under the CC0 1.0 Universal License.
The Typicons are licensed under the CC BY SA 3.0 License.
The Zondicons are licensed under the MIT License.
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dangerous workflow patterns detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
67 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More