ClassIcon

Media
stable

Renders a CSS class-based icon (e.g. MDI font) by applying the icon string as a class on the root element.

Aperçu

Rendu de l’aperçu en cours…

default

Rendu de l’aperçu en cours…

large

Rendu de l’aperçu en cours…

colored

Structure

Anatomie

Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.

Anatomy of OrigamClassIconSchematic of ClassIcon with 1 internal part. ★ 1 origam-icon icon class applied as className
Anatomy of <origam-class-icon> — 1 part. The icon string is applied directly as a CSS class on the root <i> element.
1.origam-icon
Root element (defaults to <i>). The icon prop value is injected as a CSS class, e.g. mdi-star.

API

Props

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

icon
TIcon
MDI class name or any CSS icon class applied to the root element, e.g. "mdi-star".
color
Foreground color intent or CSS color for the icon glyph.
bgColor
TColor
disabled
boolean
false
Applies reduced opacity and blocks pointer events.
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>.
Named size token (x-small…x-large) or a numeric pixel value applied as font-size and line-height.
padding
boolean | number | string
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
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>
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
maxHeight
number | string
maxWidth
number | string
minHeight
number | string
minWidth
number | string
width
number | string
rounded
boolean | number | string | TRounded | null | undefined
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

Membres exposés

Propriétés et méthodes accessibles via ref template (defineExpose). Utilisés pour le contrôle programmatique.

<T extends object>(props: T, exclude?: string[]) => Partial<T>
Utility to forward a filtered subset of props to a child component.
Ref<string>
Reactive CSS string generated by useStyle.
string
Unique style-sheet ID for this instance.
() => void
Injects the computed style sheet into the document.
() => void
Removes the injected style sheet.
Ref<boolean>
True once the style sheet has been injected into the DOM.

Personnalisation

Variables CSS

Propriétés CSS personnalisées exposées par ce composant. Surchargez-les pour personnaliser sans perdre la compatibilité avec le thème.

Icon font-size. Overridden per size variant class.

Inclusion

Accessibilité

Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.

Notes

  • Decorative icons should have aria-hidden="true" on the parent OrigamIcon. When meaningful, pass aria-label on the wrapping interactive element.

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 MDI class icon

vue

Écosystème

Famille

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