About svg.js
svg.JS provides ready to use svgs for your personal projects. Just add the following script reference to your project:
and then put in this line in your script code:
The svg.JS script will automatically replace all svg elements with the corresponding svg code. For examples:
| HTML | SVG result |
|---|---|
|
|
|
|
|
| Attribute | Description | Example |
|---|---|---|
| width | set the width of the svg | <svg width="24"> |
| height | set the height of the svg | <svg height="24"> |
| style | set the style of the svg, especailly the fill color and stroke color of the svg | <svg style="color: blue;fill: yellow"> |
Live Examples
Here's a compelte list of all the svgs that are available in the svg.JS script with live examples. You can direclty write into the svg code column and see the result in the svg result column. You can also set the width, height and style of the svg element to customize the svg.
| svg code | svg result |
|---|---|