---
$schema: https://git.drupalcode.org/project/drupal/-/raw/HEAD/core/assets/schemas/v1/metadata.schema.json
name: Icon
description: Provides common icon element for LGD themes and modules.
status: stable
props:
  type: object
  properties:
    icon_name:
      type: string
      title: Icon name
      description: >
        The filename of the icon to use, not including the extension.
    icon_path:
      type: string
      title: Icon path
      description: >
        The path to the icon directory used for the component. Ideally, this
        should be a twig-namespaced path like @foo/bar/icons. Defaults to
        @localgov_base/includes/icons/.
    icon_wrapper_element:
      type: string
      title: Icon wrapper element
      description: >
        The type of element to use to wrap the icon. Defaults to 'div'.
    icon_classes:
      type: string
      title: Icon classes
      description: >
        A space-separated string of one or more icon classes to be added to the
        defaults.
    theme:
      type: string
      title: Theme
      description: >
        The machine name of the theme containing the icon path. Defaults to
        'localgov_base', but will be ignored if icon_path already begins
        with '@'.
    decoration:
      type: string
      title: Decoration
      description: >
        If set to 'true', the icon will have aria-hidden="true" added to the
        wrapper element. Defaults to 'true'. This is useful for decorative
        icons that do not add any meaning to the content.
