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

Signature
function getProgressIcon(
progress: number,
color?: Color | string,
options?: {
background?: Color | string;
backgroundOpacity?: number;
},
): Image.Asset;progressis a number between 0 and 1 (0 meaning not started, 1 meaning finished).coloris a RaycastColoror a hexadecimal representation of a color. By default it will beColor.Red.options.backgroundis a RaycastColoror a hexadecimal representation of a color for the background of the progress icon. By default, it will bewhiteif the Raycast's appearance isdark, andblackif the appearance islight.options.backgroundOpacityis the opacity of the background of the progress icon. By default, it will be0.1.
Returns an Image.Asset that can be used where Raycast expects them.
Example
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 updated

