Skip to content

This project lets you specify an SVG icon to use, automatically rendering it on page load. It eliminates the hassle of manually copying and pasting lengthy SVG code blocks.

License

Notifications You must be signed in to change notification settings

israel-007/svg-container

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

svg-container

Never wrestle with messy, lengthy SVG codes again! This project puts the power in your hands without the hassle. Select your desired SVG icon, and voilà! No more copying and pasting long, tangled codes. Let us handle the heavy lifting while you enjoy clean, efficient rendering from page load. It's the antidote to cluttered code chaos!

Installation

  1. Download the project files.
  2. Extract the files to your server directory.
  3. import the JS and CSS files on the pages using the link and script tags
// css
<link rel="stylesheet" href="css/style.css">

// JS
<script src="js/svg.js"></script>

Usage

Once the files have been linked you can proceed to make use of the icons like:

<i svg="home" svg-width="25px" svg-class="svg-dark"></i>

<i svg="archive" svg-width="25px" svg-class="svg-dark"></i>

<i svg="calendar-edit" svg-width="25px" svg-class="svg-white" ></i>

svg="" should contain the name of the icon you want to use

svg-width="" should contain the with you want to set your icon at

svg-class="" should contain all class names you want to apply to the svg

Contributions

As this project contins few svg icons located at js/resources/icons.json, contributions to this project are welcomed! Feel free to fork the repository, make improvements, and submit pull requests.

##Dependencies

This project does not rely on any external dependencies, making it easy to set up and use.

License

This project is licensed under the MIT License.

About

This project lets you specify an SVG icon to use, automatically rendering it on page load. It eliminates the hassle of manually copying and pasting lengthy SVG code blocks.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published