A React component for the font-awesome icon library.
classNames, styles and other props (all additional props are passed directly to the component).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)' }}
/>
);
}
});
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 the CDN versions.
| Prop Name | Type | Default | Description |
|---|---|---|---|
border |
boolean |
false |
|
fixedWidth |
boolean |
false |
|
flip |
string |
'' |
Choices: 'horizontal' or 'vertical' |
inverse |
boolean |
false |
|
name |
string |
'' |
Required: 'check', 'cloud', 'person', etc... (e.g. any Font Awesome icon class name, minus the fa- prefix) |
pulse |
boolean |
false |
|
rotate |
string |
'' |
Choices: '90', '180' or '270' |
size |
string |
'' |
Choices: 'lg', '2x', '3x', '4x' or '5x' |
spin |
boolean |
false |
|
stack |
string |
'' |
Choices: '1x' or '2x' |
Pull requests welcome!
Please use the .editorconfig, .jsfmtrc and .jshintrc configurations in your editor to ensure proper formatting.
Run the test suite with npm test, make sure tests are passing and that you write tests for new features.
Created by Dana Woodman of BIG. Inspired by react-fa.
Licensed under the generous MIT license.
—
$ claude mcp add react-fontawesome \
-- python -m otcore.mcp_server <graph>