LigatureIcon
Renders a Material Design ligature icon by placing the icon name as text content inside an element styled with the Material Icons font.
Aperçu
Rendu de l’aperçu en cours…
homeRendu de l’aperçu en cours…
primaryRendu de l’aperçu en cours…
dangerRendu de l’aperçu en cours…
x-largeStructure
Anatomie
Décomposition visuelle de la structure interne du composant avec les appels de classes BEM.
<origam-ligature-icon> — 2 parts: the root element styled with the Material Icons ligature font, and the text content node that holds the ligature name.- 1.origam-icon.origam-icon--ligature
- Root element. Carries both
.origam-iconand.origam-icon--ligature. The SCSS rule setsfont-family: "Material Icons", "Material Symbols Outlined"and enablesfont-feature-settings: "liga". - 2.origam-icon--size-{size}
- Optional size modifier class (e.g.
.origam-icon--size-large). Applied only for named TSize values; numeric sizes use an inlinefont-sizestyle instead.
API
Props
Toutes les props acceptées par ce composant, avec leur type, valeur par défaut et description.
- icon
- The ligature name rendered as text content, e.g. "home" for Material Icons. The font resolves the glyph via font feature liga.
- color
- Text color (foreground) of the icon. Accepts a semantic intent or a CSS color value.
- bgColor
- Background color of the icon container.
- idstring
- classstring | Array<string> | object
- disabledbooleanfalse
- Renders the icon in a disabled (muted) visual state.
- stylestring | Array<string> | object | StyleValue
- tagstring'div'
- HTML element rendered at the root. Common alternatives: span, i.
- size
- Named size token (x-small, small, default, large, x-large) or a raw number (converted to px). Controls font-size and line-height.
- paddingboolean | number | string
- paddingTopboolean | number | string
- paddingLeftboolean | number | string
- paddingBottomboolean | number | string
- paddingRightboolean | number | string
- paddingBlockboolean | number | string
- paddingInlineboolean | number | string
- paddingInlineStartboolean | number | string
- paddingInlineEndboolean | number | string
- paddingBlockStartboolean | number | string
- paddingBlockEndboolean | number | string
- marginboolean | number | string
- marginTopboolean | number | string
- marginLeftboolean | number | string
- marginBottomboolean | number | string
- marginRightboolean | number | string
- marginBlockboolean | number | string
- marginInlineboolean | number | string
- marginInlineStartboolean | number | string
- marginInlineEndboolean | number | string
- marginBlockStartboolean | number | string
- marginBlockEndboolean | number | string
- borderboolean | number | string | TDirectionBoth | Array<TDirectionBoth>false
- Applies a border around the icon container.
- borderTopboolean | number | string
- borderLeftboolean | number | string
- borderBottomboolean | number | string
- borderRightboolean | number | string
- borderBlockboolean | number | string
- borderInlineboolean | number | string
- borderInlineStartboolean | number | string
- borderInlineEndboolean | number | string
- borderBlockStartboolean | number | string
- borderBlockEndboolean | number | string
- borderColorstring
- borderStylestring
- borderTopColorTColor
- borderRightColorTColor
- borderBottomColorTColor
- borderLeftColorTColor
- borderInlineStartColorTColor
- borderInlineEndColorTColor
- borderBlockStartColorTColor
- borderBlockEndColorTColor
- heightnumber | string
- Overrides the icon container height.
- maxHeightnumber | string
- maxWidthnumber | string
- minHeightnumber | string
- minWidthnumber | string
- widthnumber | string
- Overrides the icon container width.
- Border-radius token or boolean for the icon container.
- roundedTopRightboolean | number | string
- roundedTopLeftboolean | number | string
- roundedBottomLeftboolean | number | string
- roundedBottomRightboolean | number | string
- roundedStartStartboolean | number | string
- roundedStartEndboolean | number | string
- roundedEndStartboolean | number | string
- roundedEndEndboolean | 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 from computed icon styles.
- 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 color. Inherits currentColor by default, overridden by the color prop.
- Font size for the default size variant.
- Transition duration for color and opacity changes.
Inclusion
Accessibilité
Rôles ARIA, navigation clavier et gestion du focus. Sourcé depuis le template réel du composant.
Notes
- Decorative icons should carry aria-hidden="true" on the parent wrapper to hide them from assistive technologies.
- Requires the Material Icons or Material Symbols Outlined font to be loaded in the page. Without the font, the raw ligature text string is shown instead of the glyph.
Fondation
Design tokens
Extrait des tokens de ce composant — les variables --origam-<composant>---<propriété>, déclarées dans sa feuille de tokens tenue à la main, sans étape de build.
- colorcurrentColor
- Default icon color. Inherits currentColor so the icon automatically matches surrounding text.
- dimensionvar(--origam-font__size---md)
- Font size for the default size variant.
- dimensionvar(--origam-font__size---lg)
- Font size for the large size variant.
- colorvar(--origam-color__action--primary---bg)
- Icon color when color="primary".
- colorvar(--origam-color__text---disabled)
- Icon color when disabled.
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 ligature icon
Size variants
Écosystème
Famille
Composants du même dossier qui partagent les conventions et se composent souvent ensemble.