Icon

Media
stable

Universal icon renderer that adapts to MDI class icons, SVG paths, component-based icons and Unicode ligatures.

API

Props

Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.

icon
TIcon
Icon identifier. Accepts an MDI name (mdi-*), a SVG path string, or a component reference.
color
TColor
Icon color. Accepts a semantic intent or a CSS color string.
disabled
boolean
false
Disables pointer interaction and applies a muted visual state.
bgColor
TColor
Background color rendered behind the icon.
id
string
class
string | Array<string> | object
style
string | Array<string> | object | StyleValue
tag
string
'i'
HTML element rendered at the root. Defaults to <i>.
size
TSize | number
'default'
Controls the icon font-size via design tokens.
padding
boolean | number | string
Shorthand padding applied to the icon container.
paddingTop
boolean | number | string
paddingLeft
boolean | number | string
paddingBottom
boolean | number | string
paddingRight
boolean | number | string
paddingBlock
boolean | number | string
paddingInline
boolean | number | string
paddingInlineStart
boolean | number | string
paddingInlineEnd
boolean | number | string
paddingBlockStart
boolean | number | string
paddingBlockEnd
boolean | number | string
margin
boolean | number | string
Shorthand margin around the icon container.
marginTop
boolean | number | string
marginLeft
boolean | number | string
marginBottom
boolean | number | string
marginRight
boolean | number | string
marginBlock
boolean | number | string
marginInline
boolean | number | string
marginInlineStart
boolean | number | string
marginInlineEnd
boolean | number | string
marginBlockStart
boolean | number | string
marginBlockEnd
boolean | number | string
border
boolean | number | string | TDirectionBoth | Array<TDirectionBoth>
false
Applies a border around the icon container.
borderTop
boolean | number | string
borderLeft
boolean | number | string
borderBottom
boolean | number | string
borderRight
boolean | number | string
borderBlock
boolean | number | string
borderInline
boolean | number | string
borderInlineStart
boolean | number | string
borderInlineEnd
boolean | number | string
borderBlockStart
boolean | number | string
borderBlockEnd
boolean | number | string
borderColor
string
borderStyle
string
borderTopColor
TColor
borderRightColor
TColor
borderBottomColor
TColor
borderLeftColor
TColor
borderInlineStartColor
TColor
borderInlineEndColor
TColor
borderBlockStartColor
TColor
borderBlockEndColor
TColor
height
number | string
Explicit height override.
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
Explicit width override.
rounded
boolean | number | string | TRounded | null | undefined
Border-radius token applied to the icon container.
roundedTopRight
boolean | number | string
roundedTopLeft
boolean | number | string
roundedBottomLeft
boolean | number | string
roundedBottomRight
boolean | number | string
roundedStartStart
boolean | number | string
roundedStartEnd
boolean | number | string
roundedEndStart
boolean | number | string
roundedEndEnd
boolean | number | string

API

Slots

Emplacements de contenu exposés par ce composant.

#default
Text node that acts as the icon identifier (ligature mode). Also used to override the rendered icon with custom content.

Interactif

Playground

Modifiez les props en direct et observez le composant se mettre à jour. Le snippet de code généré suit vos changements.

Rendu de l’aperçu en cours…

Usage

Exemples

Extraits de code prêts à coller dans vos templates.

Basic icons

vue

Sizes

vue

Styled icon container

vue

Écosystème

Famille

Composants du même dossier qui partagent les conventions et se composent souvent ensemble.