Tailwind UI Pattern Registry for humans and agents

cards toggle grid list view-switcher articles css-only interactive cards toggle grid list view switcher articles blog css-only grid list view toggle without JavaScript article cards with layout switcher

Toggle Layout Cards

Fetch pattern JSON: curl https://webspire.de/patterns/cards/toggle-layout.json

Details

Family
cards
Tier
enhanced
Kind
section
Extends
cards/base
Responsive Dark Mode Tailwind Only SSR Safe Copy & Paste
Stable Published
cardstogglegridlistview-switcherarticlescss-onlyinteractive

Slots

Name Required Description
header Yes Section title and toggle buttons.
cards Yes Four article cards with image, category, title, description, and author.

Article listing with a Grid/List view toggle powered entirely by CSS. A hidden <input type="checkbox"> acts as the state store; a <style> block uses #view-toggle:checked ~ div .cards-container selectors to switch the container from a 4-column grid to a full-width flex column, and to update the active toggle button highlight. Four article cards with image placeholder, category badge, title, description, and author row.