Skip to content

VariantTile

Stable

A square tile for one AI-made option that a person can pick.

Also known as variation, option tile, image tile

Install with npm install @tattva/ui (setup), or copy the code from the kit in Downloads.

Choose one

Here the demo keeps track of the choice. Without VariantGrid, arrow keys do not move between tiles, so the Tab key stops on each one.

When to use it

One AI-made option shown as a square, so options can be compared side by side. The chosen one gets a check mark and a dark border, not only a color change.

Made of: Content · AI badge · Check mark

Use it for

  • Picking one of several generated images, layouts or drafts.
  • Inside VariantGrid, which adds arrow key movement between tiles.

Not for

Do and avoid

Do. One tile is picked, with a check mark and a dark border.
Avoid. Two tiles look picked, so nobody knows which one will be used.

Do

  • Use VariantGrid, or wrap tiles in a group that screen readers know is a set of choices, with a name.
  • Give each option a clear name, like Option B, sand block.
  • Let the content fill the whole square, like a cropped image.

Avoid

  • Do not allow picking more than one. Only one tile can be chosen.
  • Do not remove the AI badge from AI-made content.
  • Do not use it for navigation. It is for choosing between AI-made options.

On a phone

  • Each tile is a square that fills the width its grid gives it, and has a tap area of at least 44px on touch screens.
  • Selection is a tap, and the check mark shows without hover.
  • Choose the number of columns in the grid, since the tile size comes from it.

Build your next AI screen with Tattva.

Free and open, with the code. Start in one line.

Get started