Skip to main content

 

 

 

Template:OutSystems/Documentation_KB/Breadcrumb_New_Layout

 

 

Template:OutSystems/OSLanguageSwitcher

 

Applies only to Mobile Apps and Reactive Web Apps

 

 

OutSystems

Lightbox Image

Template:OutSystems/Documentation_KB/ContentCollaboration
  • Edit
    Collaborate with us
    Edit this page on GitHub
  • You can use the Lightbox Image UI Pattern to open smaller thumbnail images in full screen mode. This UI pattern is often used when creating an image gallery, allowing you to navigate through each of the images and view them in more detail.

    How to Use the Lightbox Image UI Pattern

    1. In Service Studio, in the Toolbox, search for Lightbox Image.

      The Lightbox Image widget is displayed.

    2. From the Toolbox, drag the Lightbox Image widget into the Main Content area of your application's screen.

      By default, the Lightbox Image widget contains an Image placeholder. You can add as many images as required by dragging the Image widget from the Toolbox into the Lightbox Image widget.

    3. Select the Image placeholder and on the Properties tab, from the Image drop-down, select or import the thumbnail image you want to display. In this example, we use the sample OutSystems UI Images.

      Note: In this example, the image property is set to Local Image. You can also choose External URL or Binary Data.

    4. Repeat step 3 for each of the images.

    5. From the Widget Tree, select the Lightbox Image widget, and on the Properties tab, set the relevant (optional) properties.

    Properties

    Property Description
    Title (Text): Optional Image title that is displayed when previewing the image in full screen mode.

    Examples

    • "Image 1" - Displays Image 1 as the image title.
    Group (Text): Optional Name of the group of images. Similar to the concept of a picture album, images in the same group are displayed in a gallery. You can navigate through pictures with the same group name when viewing them in full screen mode.

    Examples

    • Gallery 1 - Adds this image to the Gallery 1 group.
    ImageURL (Text): Optional URL for the image you want to show in full screen mode. If empty, a zoomed version of the thumbnail is displayed. Use this if you want to load a lower quality image as a thumbnail and display a higher quality version in full screen mode.
    ImageZoom (Decimal): Optional Defines the size of the image that opens in full screen mode (based on the thumbnail size).
    To avoid rendering problems, try to use images with the same ratio.

    Examples

    • 2 - A thumbnail with 100x100, and zoom 2 opens with 200x200.
    • 0.5 - A thumbnail with 500x500, and zoom 0.5 opens with 250x250.
    ExtendedClass (Text): Optional Add custom style classes to the Lightbox Image UI Pattern. You define your custom style classes in your application using CSS.

    Examples

    • Blank - No custom styles are added (default value).
    • "myclass" - Adds the myclass style to the Lightbox Image UI styles being applied.
    • "myclass1" "myclass2" - Adds the myclass1 and myclass2 styles to the Lightbox Image UI styles being applied.

    Compatibility with other patterns

    The Lightbox Image UI pattern can be used only with images.

    Samples

    Watch how the Product Overview sample uses the Lightbox Image UI Pattern:

    • Was this article helpful?