40+ landing page components for ReactBrowse now

Primitives

Image

Enhanced image component with configurable border radius, shadow, fallback support, and optional zoom effect on hover.

Installation

npm install @trinkui/react

Import

import { Image } from "@trinkui/react";

Radius

None
Small
Medium
Large
Full

Shadow

No shadow
Small shadow
Medium shadow
Large shadow

Zoom on Hover

Zoomable

Props

PropTypeDefaultDescription
srcrequired
string—Image source URL
altrequired
string—Alt text for accessibility
radius
"none" | "sm" | "md" | "lg" | "full""md"Border radius of the image
shadow
"none" | "sm" | "md" | "lg""none"Box shadow depth
fallbackSrc
string—Fallback image URL if the primary src fails to load
isZoomed
booleanfalseApply a hover zoom-in effect
width
number | string—Image width
height
number | string—Image height
className
string—Additional CSS classes

Accessibility

  • The alt prop is required and rendered as the native alt attribute.
  • If fallbackSrc is provided, it is swapped in automatically on load error so the layout is never broken.
  • Decorative images should use alt="" and role="presentation".