mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
1aaae5f9bf
* Update accordions.mdx * add snippet for icons * use icon snippet for consistency * add required/optional icon snippets * update for required/optional --------- Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
23 lines
963 B
Plaintext
23 lines
963 B
Plaintext
<ResponseField name="icon" type="string" required>
|
|
The icon to display.
|
|
|
|
Options:
|
|
- [Font Awesome icon](https://fontawesome.com/icons) name
|
|
- [Lucide icon](https://lucide.dev/icons) name
|
|
- JSX-compatible SVG code wrapped in curly braces
|
|
- URL to an externally hosted icon
|
|
- Path to an icon file in your project
|
|
|
|
For custom SVG icons:
|
|
1. Convert your SVG using the [SVGR converter](https://react-svgr.com/playground/).
|
|
1. Paste your SVG code into the SVG input field.
|
|
2. Copy the complete `<svg>...</svg>` element from the JSX output field.
|
|
3. Wrap the JSX-compatible SVG code in curly braces: `icon={<svg ...> ... </svg>}`.
|
|
4. Adjust `height` and `width` as needed.
|
|
</ResponseField>
|
|
|
|
<ResponseField name="iconType" type="string">
|
|
The [Font Awesome](https://fontawesome.com/icons) icon style. Only used with Font Awesome icons.
|
|
|
|
Options: `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`.
|
|
</ResponseField> |