# Auto-Fit Grid

> A responsive auto-fit grid layout — eight equal skeleton tiles that reflow with `repeat(auto-fit, minmax())`, dark/light theme toggle, and full design-system token integration, mobile-first and design-system agnostic.

- Category: Layout
- Frameworks: Vanilla, React + CSS, React + Tailwind
- Design system: Atlas
- Dark mode: yes
- Access: premium (Atheros AI Pass)
- Tags: grid, skeleton
- Page: https://builder.atheros.ai/components/auto-fit-grid
- Preview: https://d17nmjscumqk5d.cloudfront.net/builder/templates/tpl_builder_auto_fit_grid/preview-efc4797fb28c.webp

## Features

- Auto-fit column reflow via `repeat(auto-fit, minmax())` — tiles rewrap to fill the row as the viewport changes
- Eight equal tiles, each a distinct card role (profile, stat, chart, gallery, feed, tasks, promo, metrics)
- Skeleton wireframe placeholders with color-mixed accents derived from design tokens
- Responsive minmax floor steps up at 480px and 768px so tiles never collapse to a sliver
- Dark/light theme toggle with smooth CSS transitions
- All colors, spacing, and radii driven by design-system tokens
- Prefers-reduced-motion support for accessibility
- Per-tile accent colors computed via oklch color-mix from semantic palette tokens

## Accessibility

- **ARIA label** — `.bento` grid has `aria-label="Auto-fit grid layout"`
- **Busy state** — `.bento` starts `aria-busy="true"` and is cleared to `false` by `markReady()` once rendered
- **Reduced motion** — `prefers-reduced-motion: reduce` kills all animations and transitions
- **Focus-visible** — Interactive focus styling relies on `:focus-visible` from the design tokens
- **Dynamic viewport** — Uses `100dvh` for proper mobile viewport height

## Common questions

**Which frameworks is Auto-Fit Grid available in?**

Auto-Fit Grid ships as Vanilla, React + CSS and React + Tailwind — HTML, CSS, JS and React source you can copy, download or clone into Atheros AI Builder.

**Is the Auto-Fit Grid layout component free?**

Auto-Fit Grid is a premium component. Anyone can preview it; the source, downloads and AI customisation are included with Atheros AI Pass.

**Does Auto-Fit Grid support dark mode?**

Yes. Auto-Fit Grid ships light and dark themes, both drawn from the Atlas design system's tokens. Switch the preview to dark mode to compare them.

## Get the code

Preview Auto-Fit Grid live, then sign in to copy or download the source, apply another design system, or ask the AI assistant to change it: https://builder.atheros.ai/components/auto-fit-grid

Every component on https://builder.atheros.ai is also reachable from Claude Code, Cursor and Codex through the Atheros MCP server (paid plans). Component index: https://builder.atheros.ai/llms-components.txt
