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
Name | Description | Type | Default |
---|---|---|---|
image (required) | The image to display, as a URL or file-like object. | Union[str, io.IOBase] | None |
subtitle | Text displayed below the image. | str | '' |
full_width | Whether the image should take up the full width of its container. | bool | False |
label | Text displayed above the image. | str | '' |