Home
Softono
react-simple-icons

react-simple-icons

Open source MIT TypeScript
532
Stars
23
Forks
10
Issues
2
Watchers
1 month
Last Commit

About react-simple-icons

<div align="center"> <img alt="react simple icons" src="https://github.com/icons-pack/react-simple-icons/blob/main/docs/images/svg/react-simple-icons.svg" width="150" /> # react-simple-icons This package provides the [Simple Icons 16.18.0](https://github.com/simple-icons/simple-icons/releases/tag/16.18.0) packaged as a set of [React](https://facebook.github.io/react/) components. [![www.npmjs.com!](https://img.shields.io/npm/v/@icons-pack/react-simple-icons?color=CB061D&style=flat-square)](https://www.npmjs.com/package/@icons-pack/react-simple-icons) [![downloads](https://img.shields.io/npm/dw/@icons-pack/react-simple-icons?color=087BB4&style=flat-square)](https://www.npmjs.com/package/@icons-pack/react-simple-icons) [![license](https://img.shields.io/npm/l/@icons-pack/react-simple-icons?color=008660&style=flat-square)](https://github.com/icons-pack/react-simple-icons/blob/main/LICENSE) </div> ## Installation Install the package in your project directory with: ```shell npm add @icons-pack/react- ...

Platforms

Web Self-hosted

Languages

TypeScript

Links

react simple icons

react-simple-icons

This package provides the Simple Icons 16.18.0 packaged as a set of React components.

www.npmjs.com! downloads license

Installation

Install the package in your project directory with:

npm add @icons-pack/react-simple-icons

Usage

You can use simpleicons.org to find a specific icon. When importing an icon, keep in mind that the names of the icons are upperCamelCase , for instance:

  • Material Design is exposed as { SiMaterialdesign } from @icons-pack/react-simple-icons
  • azure devOps is exposed as { SiAzuredevops } from @icons-pack/react-simple-icons

Basic example

import { SiReact } from '@icons-pack/react-simple-icons';

function BasicExample() {
  return <SiReact color='#61DAFB' size={24} />;
}

Change title

@icons-pack/react-simple-icons provides a default title referring to the component name

The <title> element provides an accessible, short-text description of any SVG container element or graphics element.

import { SiReact } from '@icons-pack/react-simple-icons';

// title default "React"
function ChangeTitle() {
  return <SiReact title='My title' color='#61DAFB' size={24} />;
}

Use default color

Set color as default to use the default color for each icon

import { SiReact } from '@icons-pack/react-simple-icons';

function DefaultColorExample() {
  return <SiReact color='default' size={24} />;
}

Use default color as hex

Append Hex to the icon name to use the default color as hex string

import { SiReact, SiReactHex } from '@icons-pack/react-simple-icons';

function DefaultColorExample() {
  return <SiReact color={SiReactHex} size={24} />;
}

Custom styles

import { SiReact } from '@icons-pack/react-simple-icons';

function CustomStyles() {
  return <SiReact className='myStyle' />;
}
.myStyle {
  width: 35px;
  height: 35px;
}