Icons & Images
API Reference
Icon
List of built-in icons that can be used for actions or list items.
Example
Enumeration members
Image.Mask
Available masks that can be used to change the shape of an image.
Can be handy to shape avatars or other items in a list.
Example
Enumeration members
Name | Value |
---|---|
Circle | "circle" |
RoundedRectangle | "roundedRectangle" |
Types
Image
Display different types of images, including network images or bundled assets.
Apply image transforms to the source, such as a mask
or a tintColor
.
Tip: Suffix your local assets with @dark
to automatically provide a dark theme option, eg: icon.png
and icon@dark.png
.
Example
Properties
Property | Description | Type |
---|---|---|
source* | The Image.Source of the image. | |
fallback | Image.Fallback image, in case | |
mask | A Image.Mask to apply to the image. | |
tintColor | A Color.ColorLike to tint all the non-transparent pixels of the image. |
FileIcon
An icon as it's used in the Finder.
Example
Properties
Property | Description | Type |
---|---|---|
fileIcon* | The path to a file or folder to get its icon from. |
|
Image.ImageLike
Union type for the supported image types.
Example
Image.Source
The source of an Image. Can be either a remote URL, a local file resource, a built-in Icon or a single emoji.
For consistency, it's best to use the built-in Icon in lists, the Action Panel, and other places. If a specific icon isn't built-in, you can reference custom ones from the assets
folder of the extension by file name, e.g. my-icon.png
. Alternatively, you can reference an absolute HTTPS URL that points to an image or use an emoji. You can also specify different remote or local assets for light and dark theme.
Example
Image.Fallback
A fallback Image that will be displayed in case the source image cannot be loaded. Can be either a local file resource, a built-in Icon, a single emoji, or a theme-aware asset. Any specified mask
or tintColor
will also apply to the fallback image.
Example
Image.URL
Image is a string representing a URL.
Example
Image.Asset
Image is a string representing an asset from the assets/
folder
Example
Last updated