Thumbnail With Action

The Thumbnail With Action pattern allows you to add interactive elements to image thumbnails. By overlaying custom content onto a thumbnail component in one of the four corners, you can embed atomic components such as buttons, icons, or links that enable users to perform specific actions related to the image.

import React from "react";
import { ThumbnailWithAction } from "@nimbus-ds/patterns";
import { IconButton } from "@nimbus-ds/components";
import { TrashIcon } from "@nimbus-ds/icons";

const Example: React.FC = () => (
      aspectRatio: "1/1",
      width: "120px",
      alt: "Alt text",
      src: "",
    <IconButton source={<TrashIcon />} size="2rem" />

export default Example;

Instale o componente via terminal.

npm install @nimbus-ds/thumbnail-with-action

Additional props are passed to the <ThumbnailWithAction> element. See div docs for a list of props accepted by the <ThumbnailWithAction> element.