Skip to content

Stroke Width

Set SVG stroke width

Syntax

visual="stroke-w:[value]"

Values

ValueCSS OutputDescription
0stroke-width: 0No stroke
1stroke-width: 1px1px stroke
2stroke-width: 2px2px stroke

Examples

html
<svg visual="stroke:black stroke-w:2">...</svg>

Preview

Stroke Width

visual="stroke-w:2" - Control SVG stroke thickness

View Code
html
<div layout="flex" space="g:medium p:medium" visual="bg:neutral-100 dark:bg:neutral-900 rounded:medium">
  <svg visual="stroke:primary fill:none stroke-w:1" width="40" height="40" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/></svg>
  <svg visual="stroke:primary fill:none stroke-w:2" width="40" height="40" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/></svg>
  <svg visual="stroke:primary fill:none stroke-w:3" width="40" height="40" viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/></svg>
</div>

Arbitrary Values

Supports custom values using bracket syntax:

html
<div visual="stroke:[custom-value]">Custom</div>