Skip to content

Svg Color

SVG rendered as a mask so it takes the current text colour.

Installation

bun add @xerobi/ui
import { SvgColor } from "@xerobi/ui/svg-color"

This component is client-side. In Astro, hydrate it with a client directive.

API reference

SvgColor

Paints an SVG file with `currentColor`, so one asset follows the theme in light and dark.

PropTypeDescription
src*stringURL of the SVG used as a mask. The icon takes the current text colour.

Search documentation

Search pages, components and blocks.