mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
73edda4d1f
Co-authored-by: locadex-agent[bot] <217277504+locadex-agent[bot]@users.noreply.github.com>
26 lines
1.3 KiB
Plaintext
26 lines
1.3 KiB
Plaintext
<ResponseField name="icon" type="string">
|
|
要显示的图标。
|
|
|
|
可选值:
|
|
|
|
* [Font Awesome](https://fontawesome.com/icons) 图标名称 (如果你在 `docs.json` 中将 `icons.library` [属性](/zh/organize/settings#param-icons) 设置为 `fontawesome`)
|
|
* [Lucide](https://lucide.dev/icons) 图标名称 (如果你在 `docs.json` 中将 `icons.library` [属性](/zh/organize/settings#param-icons) 设置为 `lucide`)
|
|
* [Tabler](https://tabler.io/icons) 图标名称 (如果你在 `docs.json` 中将 `icons.library` [属性](/zh/organize/settings#param-icons) 设置为 `tabler`)
|
|
* 指向外部托管图标的 URL
|
|
* 项目中图标文件的路径
|
|
* 用花括号包裹的 SVG 代码
|
|
|
|
对于自定义 SVG 图标:
|
|
|
|
1. 使用 [SVGR 转换器](https://react-svgr.com/playground/) 转换你的 SVG。
|
|
2. 将 SVG 代码粘贴到 SVG 输入框。
|
|
3. 从 JSX 输出框中复制完整的 `<svg>...</svg>` 元素。
|
|
4. 用花括号包裹可用于 JSX 的 SVG 代码:`icon={<svg ...> ... </svg>}`。
|
|
5. 根据需要调整 `height` 和 `width`。
|
|
</ResponseField>
|
|
|
|
<ResponseField name="iconType" type="string">
|
|
[Font Awesome](https://fontawesome.com/icons) 的图标样式。仅在使用 Font Awesome 图标时生效。
|
|
|
|
可选值:`regular`、`solid`、`light`、`thin`、`sharp-solid`、`duotone`、`brands`。
|
|
</ResponseField> |