React runtime implementation for Grunticon


2.0.03 years ago6 years agoMinified + gzip package size for @amctheatres/reacticon in KB



A React-compatible implementation of Grunticon. It still requires Grunticon to generate the output files; this just replaces the runtime piece, grunticon.loader.js.


The SVG embedding component of Grunticon directly manipulates the DOM. Thus, it does not play well with React as component rerenders would wipe the SVG elements out.


npm install --save @amctheatres/reacticon


import Icon from '@amctheatres/reacticon';
import React from 'react';


export default class SampleComponent extends React.Component {
    render() {
        return (
                <p>Look, it's a reacticon!</p>
                <Icon className="icon_yourIcon" />

Additional Information

By default, an tag will be created. You may override this by passing a tagName property (tagName="div"). Or, if you would like to set the tag type for ALL icons so they use it by default, you may pass it as a fourth parameter to the initialize function.

Note that the data-grunticon-embed attribute normally required by Grunticon is not required as that functionality is implicitly assumed by using this component.

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.