Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions components/icons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Use icons from Font Awesome, Lucide, Tabler, SVGs, external URLs, or files in yo
<Icon icon="flag" size={32} />
```

## Custom image icons

Use the `src` prop to display a custom image as an icon. The image can be a file in your project or an externally hosted URL.

```mdx Custom image icon examples
<Icon src="/images/my-icon.svg" />

<Icon src="https://example.com/icon.png" />
```

## Inline icons

Icons appear inline when used within a sentence, paragraph, or heading. <Icon icon="flag" iconType="solid" /> Use icons for decoration or to add visual emphasis.
Expand Down
10 changes: 10 additions & 0 deletions es/components/icons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Utiliza iconos de Font Awesome, Lucide, Tabler, SVG (Scalable Vector Graphics),
<Icon icon="flag" size={32} />
```

## Iconos de imagen personalizados

Usa la prop `src` para mostrar una imagen personalizada como icono. La imagen puede ser un archivo de tu proyecto o una URL alojada externamente.

```mdx Custom image icon examples
<Icon src="/images/mi-icono.svg" />

<Icon src="https://example.com/icon.png" />
```


<div id="inline-icons">
## Iconos en línea
Expand Down
10 changes: 10 additions & 0 deletions fr/components/icons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ Utilisez des icônes de Font Awesome, Lucide, Tabler, des SVG (Scalable Vector G
<Icon icon="flag" size={32} />
```

## Icônes d’image personnalisées

Utilisez la prop `src` pour afficher une image personnalisée en guise d’icône. L’image peut être un fichier de votre projet ou une URL hébergée en externe.

```mdx Custom image icon examples
<Icon src="/images/mon-icone.svg" />

<Icon src="https://example.com/icon.png" />
```


<div id="inline-icons">
## Icônes en ligne
Expand Down
21 changes: 16 additions & 5 deletions snippets/es/icons-required.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
<ResponseField name="icon" type="string" required>
El icono que se mostrará.
<Info>
Debes proporcionar `icon` o `src`.
</Info>

<ResponseField name="icon" type="string">
El icono que se mostrará desde una biblioteca de iconos.

Options:

* [Font Awesome icon](https://fontawesome.com/icons) name, if you have the `icons.library` [property](/es/organize/settings#param-icons) set to `fontawesome` in your `docs.json`
* [Lucide icon](https://lucide.dev/icons) name, if you have the `icons.library` [property](/es/organize/settings#param-icons) set to `lucide` in your `docs.json`
* Nombre del [icono Tabler](https://tabler.io/icons), si tienes la `icons.library` [propiedad](/es/organize/settings#param-icons) configurada como `tabler` en tu `docs.json`
* URL to an externally hosted icon
* Path to an icon file in your project
</ResponseField>

<ResponseField name="src" type="string">
Ruta o URL de una imagen para usar como icono. Usa `src` en lugar de `icon` cuando quieras utilizar una imagen personalizada en lugar de un icono de una biblioteca.

Options:

* Ruta a un archivo de imagen en tu proyecto (por ejemplo, `/images/mi-icono.svg`)
* URL de una imagen alojada externamente (por ejemplo, `https://example.com/icon.png`)
</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>
</ResponseField>
25 changes: 18 additions & 7 deletions snippets/fr/icons-required.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
<ResponseField name="icon" type="string" required>
Icône à afficher.
<Info>
Vous devez fournir `icon` ou `src`.
</Info>

Options :
<ResponseField name="icon" type="string">
Icône à afficher depuis une bibliothèque d’icônes.

Options :

* Nom d’icône [Font Awesome](https://fontawesome.com/icons) si vous avez la [propriété](/fr/organize/settings#param-icons) `icons.library` définie sur `fontawesome` dans votre `docs.json`
* Nom d’icône [Lucide](https://lucide.dev/icons) si vous avez la [propriété](/fr/organize/settings#param-icons) `icons.library` définie sur `lucide` dans votre `docs.json`
* Nom d’icône [Tabler](https://tabler.io/icons) si vous avez la [propriété](/fr/organize/settings#param-icons) `icons.library` définie sur `tabler` dans votre `docs.json`
* URL vers une icône hébergée en externe
* Chemin vers un fichier d’icône dans votre projet
</ResponseField>

<ResponseField name="src" type="string">
Chemin ou URL d’une image à utiliser comme icône. Utilisez `src` à la place de `icon` lorsque vous souhaitez utiliser une image personnalisée plutôt qu’une icône d’une bibliothèque.

Options :

* Chemin vers un fichier image dans votre projet (par exemple, `/images/mon-icone.svg`)
* URL vers une image hébergée en externe (par exemple, `https://example.com/icon.png`)
</ResponseField>

<ResponseField name="iconType" type="string">
Style d’icône [Font Awesome](https://fontawesome.com/icons). Utilisé uniquement avec les icônes Font Awesome.

Options : `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`.
</ResponseField>
Options : `regular`, `solid`, `light`, `thin`, `sharp-solid`, `duotone`, `brands`.
</ResponseField>
20 changes: 15 additions & 5 deletions snippets/icons-required.mdx
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
<ResponseField name="icon" type="string" required>
The icon to display.
<Info>
Either `icon` or `src` must be provided.

Check warning on line 2 in snippets/icons-required.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

snippets/icons-required.mdx#L2

In general, use active voice instead of passive voice ('be provided').
</Info>

<ResponseField name="icon" type="string">
The icon to display from an icon library.

Options:
- [Font Awesome icon](https://fontawesome.com/icons) name, if you have the `icons.library` [property](/organize/settings-appearance#param-icons) set to `fontawesome` in your `docs.json`
- [Lucide icon](https://lucide.dev/icons) name, if you have the `icons.library` [property](/organize/settings-appearance#param-icons) set to `lucide` in your `docs.json`
- [Tabler icon](https://tabler.io/icons) name, if you have the `icons.library` [property](/organize/settings-appearance#param-icons) set to `tabler` in your `docs.json`
- URL to an externally hosted icon
- Path to an icon file in your project
</ResponseField>

<ResponseField name="src" type="string">
Path or URL to an image to use as the icon. Use `src` instead of `icon` when you want to use a custom image rather than an icon from a library.

Options:
- Path to an image file in your project (for example, `/images/my-icon.svg`)
- URL to an externally hosted image (for example, `https://example.com/icon.png`)
</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>
</ResponseField>
21 changes: 16 additions & 5 deletions snippets/zh/icons-required.mdx
Original file line number Diff line number Diff line change
@@ -1,17 +1,28 @@
<ResponseField name="icon" type="string" required>
要显示的图标。
<Info>
必须提供 `icon` 或 `src` 之一。
</Info>

<ResponseField name="icon" type="string">
要从图标库中显示的图标。

可选值:

* 如果在 `docs.json` 中将 `icons.library` [属性](/zh/organize/settings#param-icons) 设置为 `fontawesome`,则为 [Font Awesome 图标](https://fontawesome.com/icons) 的名称
* 如果在 `docs.json` 中将 `icons.library` [属性](/zh/organize/settings#param-icons) 设置为 `lucide`,则为 [Lucide 图标](https://lucide.dev/icons) 的名称
* 如果在 `docs.json` 中将 `icons.library` [属性](/zh/organize/settings#param-icons) 设置为 `tabler`,则为 [Tabler 图标](https://tabler.io/icons) 的名称
* 指向外部托管图标的 URL
* 项目中图标文件的路径
</ResponseField>

<ResponseField name="src" type="string">
用作图标的图像的路径或 URL。当你希望使用自定义图像而不是图标库中的图标时,请使用 `src` 代替 `icon`。

可选值:

* 项目中图像文件的路径(例如,`/images/my-icon.svg`)
* 外部托管图像的 URL(例如,`https://example.com/icon.png`)
</ResponseField>

<ResponseField name="iconType" type="string">
[Font Awesome](https://fontawesome.com/icons) 的图标样式。仅在使用 Font Awesome 图标时有效。

可选值:`regular`、`solid`、`light`、`thin`、`sharp-solid`、`duotone`、`brands`。
</ResponseField>
</ResponseField>
10 changes: 10 additions & 0 deletions zh/components/icons.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,16 @@ import IconsRequired from "/snippets/zh/icons-required.mdx";
<Icon icon="flag" size={32} />
```

## 自定义图像图标

使用 `src` 属性将自定义图像显示为图标。该图像可以是项目中的文件,也可以是外部托管的 URL。

```mdx Custom image icon examples
<Icon src="/images/my-icon.svg" />

<Icon src="https://example.com/icon.png" />
```


<div id="inline-icons">
## 行内图标
Expand Down
Loading