Skip to content

lucas224112/SVGAutoLoader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

SVGAutoLoader

SVGAutoLoader is a lightweight tool that automatically loads SVG files into <svg> elements using the src attribute. It also dynamically detects changes and new SVG elements.

How to Use

To use SVGAutoLoader, simply load the script <script src="https://assets.lucasguimaraes.pro/js/SVGAutoLoader.js"></script> in your HTML and add the src attribute to the <svg> element with the path to the SVG file you want to load.

Example usage:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>SVG Auto Loader</title>
    <script src="https://assets.lucasguimaraes.pro/js/SVGAutoLoader.js"></script>
</head>
<body>

    <svg src="https://lucasguimaraes.pro/svg/icon.svg"></svg>

</body>
</html>

About

SVGAutoLoader is a lightweight tool that automatically loads SVG files into <svg> elements using the src attribute.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published