The Circular Image component for Retool Apps
A content area to display a circular image.
Circular Image is a preset version of Image. It has been preconfigured with a 50% border radius.
Settings
Circular Image includes the following configurable options when building apps in the IDE.
Show on desktopShow on mobileMaintain space when hiddenMarginAlways show in edit modeStyles |
Properties
All properties for Circular Image with supported data types or values. You can write JavaScript almost anywhere in Retool to manipulate or read property values.
aspectRatio
The ratio of width-to-height (e.g., 1.3
to use 4:3 ratio).
clickable
Whether there is an enabled Click event handler.
dbBlobId
Self-hosted Retool deployments only. The ID of the uploaded image when srcType
is dbBlobId
.
Values
flipHorizontal
Whether the image is flipped horizontally.
flipVertical
Whether the image is flipped vertically.
global
Whether the object is globally scoped for use in all app pages.
heightType
Whether the height automatically resizes to fit content or is a fixed size.
Values
Whether the component is visible.
horizontalAlign
The horizontal alignment of the contents.
Values
id
The unique identifier.
isHiddenOnDesktop
Whether the component is visible in the desktop layout.
isHiddenOnMobile
Whether the component is visible in the mobile layout.
maintainSpaceWhenHidden
Whether the component takes up space on the canvas if hidden
is true
.
pluginType
The plugin type.
retoolFileObject
The file's data when using a file not stored in Retool Storage.
retoolStorageDynamicInput
Whether retoolStorageFileId
is set dynamically.
retoolStorageFileId
The Retool Storage file ID if srcType
is retoolStorageFileId
.
Whether to show legacy files in the file picker.
showInEditor
Whether to remain visible in the editor if hidden
is true
.
storageBlobId
The ID of the uploaded image when srcType
is storageBlobId
.
tooltipText
The tooltip text to display.
Methods
JavaScript API methods for interacting with Circular Image. You can write JavaScript almost anywhere in Retool and use methods to manipulate data and property values.
scrollIntoView
Scrolls the canvas or parent container so that the selected component appears in the visible area.
circularImage.scrollIntoView(scrollIntoViewOptions)
Parameters
setDisabled
Set the disabled
value to toggle whether the input field is disabled. Defaults to true
without a parameter.
circularImage.setDisabled(disabled)
Parameters
setFlipHorizontal
Set the flipHorizontal
value to toggle whether the component is flipped horizontally.
circularImage.setFlipHorizontal(flipHorizontal)
Parameters
setFlipVertical
Set the flipVertical
value to toggle whether the component is flipped vertically.
circularImage.setFlipVertical(flipVertical)
Parameters
setHidden
Set the hidden
value to toggle whether the component is visible. Defaults to true
without a parameter.
circularImage.setHidden(hidden)
Parameters
setImageUrl
Set the URL of the image.
circularImage.setImageUrl(src)
Parameters
Events
Events are triggered by user interactions, such as clicking a button or entering a value. Use event handlers to trigger queries or other actions in response to events.
click
The item is clicked or pressed.