import { define } from 'forge' import { Section } from './section' import { H2, H3, H4, H5, Text } from './text' import { VStack, HStack } from './stack' import { Grid } from './grid' export const Image = define('Image', { base: 'img', variants: { objectFit: { cover: { objectFit: 'cover' }, contain: { objectFit: 'contain' }, fill: { objectFit: 'fill' }, none: { objectFit: 'none' }, 'scale-down': { objectFit: 'scale-down' }, }, }, }) export type ImageProps = Parameters[0] export const Test = () => { const sampleImages = [ 'https://picsum.photos/seed/1/400/600', // Portrait 'https://picsum.photos/seed/2/600/400', // Landscape 'https://picsum.photos/seed/3/300/300', // Square 'https://picsum.photos/seed/4/200/100', // Small image ] return (

Image Examples

{/* Size variations */}

Size Variations

64x64 64x64 96x96 96x96 128x128 128x128 192x128 192x128
{/* Object fit variations */}

Object Fit Variations

Same image with different object-fit values Object cover object-fit: cover Object contain object-fit: contain Object fill object-fit: fill Object scale-down object-fit: scale-down Object none object-fit: none
{/* Styling examples */}

Styling Examples

Rounded with border Rounded + Border With shadow With Shadow Circular with effects Circular + Effects
{/* Common use cases */}

Common Use Cases

{/* Avatar */}

Avatar

Avatar
{/* Card image */}

Card Image

Card image
Card Title
Card description goes here
{/* Gallery grid */}

Gallery Grid

{sampleImages.map((src, i) => ( {`Gallery ))}
) }