Skip to Content
文档

SVG

用于 SVG 元素的 JSX 样式属性。

填充

¥Fill

使用 fill 属性设置 SVG 元素的填充颜色。

¥Use the fill prop to set the fill color of an SVG element.

<chakra.svg fill="blue.500">
  <path d="..." />
</chakra.svg>
属性CSS 属性标记类别
fillfillcolors

描边

¥Stroke

使用 stroke 属性设置 SVG 元素的描边颜色。

¥Use the stroke prop to set the stroke color of an SVG element.

<chakra.svg stroke="blue.500">
  <path d="..." />
</chakra.svg>
属性CSS 属性标记类别
strokestrokecolors

描边宽度

¥Stroke Width

使用 strokeWidth 属性设置 SVG 元素的描边宽度。

¥Use the strokeWidth prop to set the stroke width of an SVG element.

<chakra.svg strokeWidth="1px">
  <path d="..." />
</chakra.svg>
属性CSS 属性标记类别
strokeWidthstroke-widthborderWidths

Previous

间距

Next

表格