Socket
Socket
Sign inDemoInstall

react-fontawesome

Package Overview
Dependencies
3
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-fontawesome

A React component for the font-awesome icon library.


Version published
Weekly downloads
37K
increased by1.07%
Maintainers
1
Install size
10.3 kB
Created
Weekly downloads
 

Changelog

Source

v1.1.0

  • Remove prepublish step so builds work on Windows

Readme

Source

react-fontawesome

Travis CI build status Dependency Status View on npm View on npm

A React component for the font-awesome icon library.

Install

npm install --save react-fontawesome

Usage

var React = require('react');
var FontAwesome = require('react-fontawesome');

React.render(<FontAwesome name='rocket' />, document.body);

Features

  • No dependencies (other than React)
  • Simple API that mirrors Font Awesome's class names.
  • Supports all Font Awesome modifiers (see API below).
  • Add your own classNames, styles and other props (all additional props are passed directly to the component).

Note: This component does not include any of the Font Awesome CSS or fonts, so you'll need to make sure to include those on your end somehow, either by adding them to your build process or linking to CDN versions.

Examples

var React = require('react');
var FontAwesome = require('react-fontawesome');

var MyComponent = React.createClass({
  render: function () {
    return (
      <FontAwesome
        className='super-crazy-colors'
        name='rocket'
        size='2x'
        spin
        style={{ textShadow: '0 1px 0 rgba(0, 0, 0, 0.1)' }}
      />
    );
  }
});

API

See the API docs for full documentation.

Contributing

Pull requests welcome!

Please use the .editorconfig, .eslintrc configurations in your editor to ensure proper formatting.

Run the test suite with npm test and linting with npm run lint. Make sure tests are passing and that you write tests for new features and document changes to the API with updates to the JSDocs.

License

MIT © Dana Woodman

Keywords

FAQs

Last updated on 10 May 2016

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc