Beautiful doc in https://react-ionicons.netlify.app/
$ npm install --save react-ionicons
or
$ yarn add react-ionicons
import React from 'react'
import { render } from 'react-dom'
import { LogoNodejs } from 'react-ionicons'
<LogoNodejs
color={'#00000'}
rotate
height="250px"
width="250px"
onClick={() => alert('Hi!')}
/>
browserify
is supported, but you have to install browserify-css@^0.12.0
manually.
- SVG Icons.
- Simple API.
- Animations.
- Customizable.
- Support to Create React App.
- Typescript support.
Param | Type | Description | Example |
---|---|---|---|
height |
String |
Icon size. Allow all units (px, em, %, pt...). | height="22px" |
width |
String |
Icon size. Allow all units (px, em, %, pt...). | width="22px" |
color |
String |
Icon color. Allow string (blue, red, cyan...), rgb, rgba and hexadecimal colors. | color="#C9C9C9" |
rotate |
Boolean |
Apply rotate animation to icon | rotate={true} |
shake |
Boolean |
Apply shake animation to icon | shake={true} |
beat |
Boolean |
Apply beat animation to icon | beat={true} |
onClick |
Function |
Pass a function to execute onClick | onClick={() => console.log('Hi!')} |
style |
Object |
Pass a style object | style={{ verticalAlign: 'middle' }} |
cssClasses |
String |
Pass a string with cssClasses | cssClasses="myButton" |