Skip to main content

ImageOutput

Image output widget for displaying images.

Examples

Basic Usage

This example runs a form with a single page containing the widget

Example Code

from abstra.forms import ImageOutput, run

# Create a page with the widget
example_page = [
ImageOutput("https://http.cat/status/200.jpg", subtitle="This is a cat"),
]

# Run the form
result = run([example_page])

# Print the result
print(result)

Parameters

NameDescriptionTypeDefault
image (required)The image to display, as a URL or file-like object.Union[str, io.IOBase]None
subtitleText displayed below the image.str''
full_widthWhether the image should take up the full width of its container.boolFalse
labelText displayed above the image.str''