Vistaprint
styleKeyssquareImageContainer

Square Image Container

A Square Image Container creates a square element that centers a [FluidImage](/fluid-image inside it, and stretches the image to fill the width or height of the square as appropriate for the image's aspect ratio.

Share
Share
jsx
jsx
<SquareImageContainer>
<FluidImage src="my-image.png" alt="My Alt Text" />
</SquareImageContainer>
<div class="square-image-container">
<div class="square-image-container-inner">
<img src="my-image.png" alt="My Alt Text" class="fluid-image" />
</div>
</div>

Components

SquareImageContainer

SquareImageContainer has no props of its own

All props are forwarded to the element specified in thecomponentprop(default: <div/>)

Guidelines

  • Square Image Container should only use Fluid Images and not Responsive Images.