ThatDesignUIOriginalInteractive preview
Showcase panels
Rich gradient panels where the open one reveals an illustrated preview and caption while the rest fold into vertical labels. Keyboard operable, with no dependencies.
- Category
- Sliders
- Platform
- Responsive
- Colorful
- Interactive
- Animated
Interactive componentClick through it, resize it, or switch states. It’s real UI, not a screenshot.
Use this component
Free to use. It works on its own in any React and Tailwind project, so you can add it with one command, paste the code, or hand the prompt to your coding agent.
FreeReact 18+Tailwind v3.4 or v4No extra packages
1. Add it with the shadcn CLI
npx shadcn@latest add https://www.thatdesignui.com/r/expanding-panels.json2. Use it
Every prop is optionalapp/page.tsx
import ExpandingPanels from "@/components/expanding-panels";
export default function Page() {
return <ExpandingPanels />;
}Prefer to paste it yourself? Open the .
Under the hood
How it’s built
What’s inside
- A row of 3 to 6 rounded (28px) gradient panels with a soft noise texture and a highlight that follows the pointer inside the open panel; on phones they stack in a column.
- The open panel is about six times wider than a closed one and animates smoothly. It shows a floating glass illustration, a tag pill, a large title, a sentence and an Explore link with an arrow.
- Closed panels show a two-digit index and the title written vertically (horizontally in the phone column).
- Five illustration styles rotate by position: onboarding checklist, dashboard bars, payment card, chat with a typing indicator, settings toggles. Text colour flips to dark on light gradients.
- Colours come from each slide's two hex values; nothing depends on the host theme.
How it behaves
- Clicking a closed panel opens it and closes the previous one; exactly one panel has aria-expanded=true.
- Left/Right/Up/Down arrows move focus and open the neighbouring panel; Home and End jump to the first and last.
- A visible focus ring shows on the focused panel.
- On a 375px screen the panels stack vertically and the open panel shows its caption.
- With reduced motion enabled the panel width changes instantly and the illustration does not float.



