LigatureIcon
Renders a Material Design ligature icon by placing the icon name as text content inside an element styled with the Material Icons font.
Preview
Rendering the live preview…
homeRendering the live preview…
primaryRendering the live preview…
dangerRendering the live preview…
x-largeStructure
Anatomy
Visual breakdown of the component's internal structure with BEM class call-outs.
<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
All props accepted by this component, with their type, default value and 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
Exposed members
Properties and methods accessible via template ref (defineExpose). Use them for programmatic control.
- <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.
Customisation
CSS variables
CSS custom properties exposed by this component. Override them to customise the component without losing theme compatibility.
- 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
Accessibility
ARIA roles, keyboard navigation and focus management. Sourced from the real component template.
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.
Foundation
Design tokens
Excerpt from this component's token declarations — the --origam-<component>---<property> variables, declared in its hand-maintained token sheet with no build step.
- 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.
Interactive
Playground
Edit props live and see the component update in real time. The generated code snippet updates as you change values.
Rendering the live preview…
Usage
Examples
Ready-to-paste code snippets for your templates.
Basic ligature icon
Size variants
Ecosystem
Family
Components from the same folder that share conventions and often compose together.