Icons
#
InstallationFor detailed instructions, view our install section in this documentation. Make sure all of the dependencies and polyfills are loaded to make the component cross-browser compatible.
#
CDN<script src="https://unpkg.com/@pearson-ux/icon"></script>
#
NPMnpm i @pearson-ux/icon --save
#
Demo <pearson-icon icon="menu" size="18"></pearson-icon>
#
StructureTo add an icon, just add the markup in your app where you want it displayed.
#
Stylingpearson-icon { fill: red;}
#
API#
RequiredAll attributes in this API are required.
Attribute | Type | Default | Description |
---|---|---|---|
icon | String | unset | The name of the icon you want to appear. Please visit our CSS icon page for a full list of icons |
size | String | unset | The value can be either 18 or 24 and sets the size of the SVG icon |
#
CSS IconsDo you prefer to use our SVG sprite library instead of a web component? No problem, Please visit our CSS icon page for detailed instructions on how to use our SVG Icon library.