getProgressIcon
Icon to represent the progress of a task, a project, something.

Progress Icon example
function getProgressIcon(
progress: number,
color?: Color | string,
options?: {
background?: Color | string;
backgroundOpacity?: number;
}
): Image.Asset;
progress
is a number between 0 and 1 (0 meaning not started, 1 meaning finished).color
is a RaycastColor
or a hexadecimal representation of a color. By default it will beColor.Red
.options.background
is a RaycastColor
or a hexadecimal representation of a color for the background of the progress icon. By default, it will bewhite
if the Raycast's appearance isdark
, andblack
if the appearance islight
.options.backgroundOpacity
is the opacity of the background of the progress icon. By default, it will be0.1
.
import { List } from "@raycast/api";
import { getProgressIcon } from "@raycast/utils";
export default function Command() {
return (
<List>
<List.Item icon={getProgressIcon(0.1)} title="Project" />
</List>
);
}
Last modified 1d ago