Image Component

Overview

The image component is used to display visual content, such as pictures, icons, logos, and other types of images and can be made clickable using blocks. The image component is foundational in creating visually appealing and engaging mobile app interfaces.

Properties

You can customize your image using the following properties:

Image

Picture Resize Mode

  • Center: The image is displayed at its original size within the container, and it is centered both vertically and horizontally. This means that if the image is larger than the container, parts of it may extend beyond the container's edges.

  • Cover: The image is resized to completely cover the container while maintaining its aspect ratio. This mode ensures that the entire container is filled with the image, and any excess image parts are cropped if necessary. This can result in parts of the image being clipped.

  • Contain: The image is resized to fit entirely within the container while maintaining its aspect ratio. This mode ensures that the entire image is visible within the container, and it may result in empty space around the image if the container's aspect ratio differs from the image's aspect ratio.

  • Repeat: The image is tiled or repeated to fill the entire container, both horizontally and vertically. This mode is often used for creating patterns or backgrounds that seamlessly repeat across the container.

  • Stretch: The image is resized to fully cover the container without maintaining its original aspect ratio. This can distort the image and may result in an unnatural appearance, so it's generally not recommended for most scenarios.

When working with these resize modes, it's important to consider the context of your app's design and the type of content you're displaying. Different situations might call for different resize modes to achieve the desired visual outcome. For instance, cover might be suitable for background images, while contain could work well for displaying profile pictures. Always strive to maintain a visually pleasing and user-friendly experience while keeping the specific characteristics of each resize mode in mind.

Layout

Style

Image Blocks

To access the blocks specific to the switch component:

  1. On the Design tab, add a Image component to a screen.

  2. Navigate to the Blocks tab.

  3. In the component tree on the left, click the name of the image component.

  4. A drawer of image-specific blocks opens.

Last updated