Parametric DSL API
Render dynamic vector icons from JSON DSL specifications using the core QuickSVG component.
Dynamic Component Example
// Import QuickSVG component & metadata lookup helper
import { QuickSVG, getIcon } from '@mdsharik/quicksvg';
// Fetch icon data dynamically
const iconData = getIcon('eye-dashed');
export default function DynamicIcon() {
return (
<QuickSVG
dsl={iconData.dsl}
size={32}
strokeWidth={2}
color="#3b82f6"
/>
);
}
DSL Schema Definition
[
{ "type": "path", "d": "M 13 2 L 3 14 h 9 l -1 8 10 -12 h -9 l 1 -8 z" },
{ "type": "circle", "cx": 12, "cy": 12, "r": 3 },
{ "type": "rect", "x": 4, "y": 4, "w": 16, "h": 16, "rx": 4 }
]