Forge Developer

Beta

Forge Developer

Beta

Rate this page:

Image

A component to display an image.

Usage

1
import ForgeUI, { Image } from '@forge/ui';

Props

NameTypeRequiredDescription
altstringYesThe alternative text displayed if the image is not loaded.
srcstringYesThe URL of the image.
sizestringThe size of the image. Valid values are xsmall, small, medium, large, and xlarge. Defaults to xlarge.

Example

Display an animated GIF.

1
2
3
4
<Image
  src="https://media.giphy.com/media/jUwpNzg9IcyrK/source.gif"
  alt="homer"
/>

Preview

Gif of homer simpson retreating into bushes

Rate this page: