Browse documentation

Reference / SVG

Stroke color

Paint the outline of an SVG path or shape, independently of its interior fill.

Working example

Use fill-none when a path should be hollow. A closed path otherwise inherits SVG’s default fill.

HTML
<svg viewBox="0 0 24 24" role="img" aria-label="Bookmark" class="size-12 text-black">
  <path d="M6 3h12v18l-6-4-6 4Z" class="fill-none stroke-current stroke-2"/>
</svg>

Class reference

ClassCSS declarations
stroke-currentstroke: currentColor;
stroke-blackstroke: #000;
stroke-whitestroke: #fff;
stroke-neutral-500stroke: oklch(0.65 0 0);
stroke-nonestroke: none;
View full generated CSS
Compiled CSS
.stroke-black {
  stroke: #000;
}
.stroke-current {
  stroke: currentColor;
}
.stroke-neutral-500 {
  stroke: oklch(0.65 0 0);
}
.stroke-none {
  stroke: none;
}
.stroke-white {
  stroke: #fff;
}