Svg Generator
LibraryAllows for generation of SVGs at runtime
Generate SVGs dynamically within your razor!
SVG data can be generated dynamically through code, then passed as a string to the SvgGenerator to generate at runtime. The code is based heavily on the already existing Sandbox.SvgPanel.
Example use:
SVG data can be generated dynamically through code, then passed as a string to the SvgGenerator to generate at runtime. The code is based heavily on the already existing Sandbox.SvgPanel.
Example use:
@using Sandbox;
@using Sandbox.UI;
@using JBG.UI;
@using Sandbox.UI.Navigation
@inherits PanelComponent
<div class="root">
<SvgGenerator SvgAsString=@SvgString [email protected] class="icon" />
</div>
<style>
.root {
width: 100%;
height: 100%;
position: relative;
}
.icon {
position: absolute;
left: 50%;
top: 50%;
width: 250px;
height: 250px;
transform: translate(-50%, -50%);
}
</style>
@code
{
public string SvgString = @"<svg xmlns=""http://www.w3.org/2000/svg"">
<path d = ""M12 0C5.39 0 .004 5.388.004 12S5.39 24 12 24s11.996-5.388 11.996-12S18.627 0 12 0zm0 21.314c-5.131
0-9.294-4.164-9.294-9.297C2.706 6.884 6.869 2.72 12 2.72s9.294 4.164 9.294 9.297c0 5.133-4.163 9.297-9.294
9.297zm-.561-10.725-1.92-1.904-1.41 1.411L6.75 8.719l-1.92 1.904L6.206 12l-1.444 1.445 1.92 1.921 1.427-1.445L9.587
15.4l1.92-1.921L10.029 12l1.41-1.411zm7.748-.051-1.41 1.411 1.478 1.479-1.92 1.904-1.478-1.479-1.444 1.445-1.903-1.921
1.444-1.428-1.376-1.377 1.903-1.921 1.376 1.377 1.41-1.411 1.92 1.921z""/></svg >";
protected override int BuildHash() => System.HashCode.Combine(SvgString);
}
No usage statistics available
This package may be new or not widely used yet. Usage data becomes available as more users install and play with the package.
This package may be new or not widely used yet. Usage data becomes available as more users install and play with the package.
0 recorded entries
| Rank | Player | Score | Recorded |
|---|---|---|---|
|
refresh
Discovering package leaderboards...
|
|||
Package ID:
joeybuildsgames.svggenerator
Created:
2026-05-16 13:18 UTC
Updated:
2026-05-16 14:29 UTC
Type:
library
Public:
Yes
Version:
252537
files:
7
Size:
0.0 MB
Engine Version:
25
Asset Version ID:
252537
Version Created:
2026-05-16 14:29 UTC
Hash:
5909516219365551146
Manifest: Open manifest
252537
May 16, 2026
Changes on 2026-05-16
252462
May 16, 2026
Changes on 2026-05-16
Live API Passthrough & Removal Notice
This file manifest and asset metadata are retrieved live directly from the official Facepunch s&box public API. s&box Explorer does not host, store, or redistribute any package files. All download links route directly to Facepunch CDN servers.