Skip to content

Un test de webcomponent pour rendre des icônes sous forme de SVG inline

Notifications You must be signed in to change notification settings

jonTravens/icon-webcomponent

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Icon Component

A web component for displaying icons.

Installation

You can install this component via npm:

npm install icon-component

Or include it directly in your HTML file using unpkg.com:

<script src="https://unpkg.com/icon-component"></script>

Utilisation

<icon-component icon="example-icon" size="24"></icon-component>

Attributes

icon: Name of the icon to display. size: Size of the icon in pixels.

Browser Compatibility

This component uses Web Components and ES6 modules. Make sure to include polyfills for browsers that do not support these features.

<!-- Web Components Polyfill -->
<script src="https://unpkg.com/@webcomponents/webcomponentsjs"></script>

<!-- ES6 Modules Polyfill -->
<script type="module-shim" src="https://unpkg.com/es-module-shims"></script>

<!-- Your icon component script -->
<script src="https://unpkg.com/icon-component"></script>

About

Un test de webcomponent pour rendre des icônes sous forme de SVG inline

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published