UI Kit components
UI Kit hooks
Forge bridge APIs
Jira bridge APIs
Upgrade UI Kit versions
Previous versions

Icon

To add the Icon component to your app:

1
2
import { Icon } from "@forge/react";

Description

An icon is a visual representation of a command, device, directory, or common action.

Props

NameTypeRequiredDescription
glyphstringNoName of the icon to be rendered.
labelstringYesText used to describe what the icon is in context. A label is needed when there is no pairing visible text next to the icon. An empty string marks the icon as presentation only.
size"small" | "medium" | "large" | "xlarge"NoThere are three icon sizes – small (16px), medium (24px), large (32px), and xlarge (48px). This pixel size refers to the canvas the icon sits on, not the size of the icon shape itself.

Examples

Default

Valid icons can be found in the Atlassian Design System Icon Library.

Extract the glyph segment of the icon's import to get the valid icon name to pass into iconBefore or iconAfter (eg. @atlaskit/icon/glyph/like -> like is a valid icon name).

Example image of default icon

1
2
const IconDefault = () => {
  return (
    <Icon glyph="like" label="Like" />
  );
};

Sizing

Small

Example image of small icon

1
2
const IconSmall = () => {
  return (
    <Icon glyph="like" label="Like" size="small" />
  );
};

Medium (default)

Example image of medium icon

1
2
const IconMedium = () => {
  return (
    <Icon glyph="like" label="Like" size="medium" />
  );
};

Large

Example image of large icon

1
2
const IconLarge = () => {
  return (
    <Icon glyph="like" label="Like" size="large" />
  );
};

Extra Large

Example image of extra large icon

1
2
const IconExtraLarge = () => {
  return (
    <Icon glyph="like" label="Like" size="xlarge" />
  );
};

Rate this page: