A card-like tile with a responsive group wrapper for laying out feature grids, link collections, or image galleries. Tiles can render as links, and the group supports grid and masonry layouts.
Install
pnpm dlx shadcn@latest add https://sitex.full.dev/r/tile.jsonUsage
import { Tile, TileContent, TileGroup } from "@/components/ui/tile"
export function FeatureGrid() {
return (
<TileGroup size="sm">
<Tile variant="outline" href="/docs/pages">
<TileContent>
<h3>Pages</h3>
<p>File-based routing for MDX and TSX pages.</p>
</TileContent>
</Tile>
<Tile variant="muted">
<TileContent>
<h3>Layouts</h3>
<p>Shared wrappers with SEO baked in.</p>
</TileContent>
</Tile>
</TileGroup>
)
}Key parts:
Tilehas four variants:default(transparent border),inset(negative horizontal margin),outline(bordered), andmuted(filled background). Passinghrefrenders anainstead of adivand enables a hover state.TileGroupwraps tiles withvariant="default"(auto-fit grid) orvariant="masonry"(CSS columns), andsizesm,default, orlgcontrolling the minimum column width (240px, 300px, or 400px).TileContentadds the inner padding and vertical flex layout for text content.tileVariantsandtileGroupVariantsare exported for reusing the variant classes elsewhere.