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 属性 | 标记类别 |
|---|---|---|
fill | fill | colors |
描边
¥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 属性 | 标记类别 |
|---|---|---|
stroke | stroke | colors |
描边宽度
¥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 属性 | 标记类别 |
|---|---|---|
strokeWidth | stroke-width | borderWidths |