Skip to content

Image

Used to display images.

Example image
import { Image } from '@fintech-sandpit/ui/react';
return (
<Image
src="https://example.com/image.png"
alt="Example image"
w="20rem"
ratio={3/4}
/>
);
NameTypeRequiredDefaultDescription
srcstringYesImage source
altstringYesImage alt text
wCssUnit100%Image width
hCssUnit100%Image height
rationumber1/1Aspect ratio
type CssUnit = `${number}${'px' | 'em' | 'rem' | 'vw' | 'vh' | 'vmin' | 'vmax' | '%'}`