Skip to main content

IconSymbol

Used to implement material symbol icons and adapt their properties.

Submit feedback
github
import { IconSymbol } from '@uhg-abyss/mobile';
    <IconSymbol icon="home" size={40} variant="filled" color="$semantic.color.icon.status.info" />

    Icons

    Use the icon property to adjust which icon is being selected.

    Colors

    Use the color property to adjust the color of a material symbol icon. The default color is set to the theme 'interactive1'.

    Size

    Use the size property to adjust the size of an icon by setting it to a specific number or token. The default size is set to 24. Token sizes: $icon.sizing.xs: 16 $icon.sizing.sm: 20 $icon.sizing.md: 24 $icon.sizing.lg: 40 $icon.sizing.xl: 48

    Material Symbol Variants

    Use the variant property to change the style of Material symbol icons. The default variant is filled.

    IconSymbol Props

    Prop NameTypeDefaultDescription
    colorstring$icon.color.defaultSet the color of the material symbol icon
    disableScalingbooleanfalseSpecifies whether the icon should scale to respect Text Size accessibility settings
    fallbackJSX.Element-Fallback element to render when the icon fails to load
    iconstring-Name of the material symbol icon
    isScreenReadablebooleanfalseIndicate whether the icon is screen readable or not. If the icon is Screen Readable, then provide a title
    maxFontSizeMultiplierboolean-Specifies the largest possible scale the icon can reach when disableScaling is false
    onErrorfunction-Callback function when the icon fails to load
    onLoadfunction-Callback function when the icon is loaded
    sizenumber | string$icon.sizing.mdSet the size of the material symbol icon
    titlestring-Set the title of the icon
    variantfilled | outlinedfilledThe style variation of the material symbol icon

    IconSymbol Classes

    Class NameDescription
    abyss-icon-symbol-rootMaterial symbol icon root element

    Icon Tokens

    Token NameValue
    icon.color.default
    #196ECF
    icon.sizing.xs
    16
    icon.sizing.sm
    20
    icon.sizing.md
    24
    icon.sizing.lg
    40
    icon.sizing.xl
    48
    Table of Contents