Skip to component
GGamma

Stack reveal

A collapsed deck of cards that fans out into a readable column when opened.

New

Recent events

  • New messageMaya in #design-review3h
  • User signed upgrowth@gamma.dev7h
  • Billing reminderInvoice 1042 due Friday9h
  • Deploy finishedgamma-docs · 34s build1d
Live previewUse keyboard to interact

Implementation

1"use client";2 3import { useId, useState } from "react";4import type {5  CSSProperties,6  HTMLAttributes,7  KeyboardEvent,8  ReactNode,9} from "react";10import { ViewTransitionSafe } from "./ViewTransitionSafe";11import { runViewTransition } from "@/lib/view-transition";12 13export type StackRevealItem = {14  id: string;15  /** Card heading. */16  title: string;17  /** Secondary line under the title. */18  detail?: string;19  /** Small trailing value, for example a time. */20  meta?: string;21  /** Leading visual slot. */22  icon?: ReactNode;23};24 25export type StackRevealProps = Omit<26  HTMLAttributes<HTMLDivElement>,27  "children" | "onChange"28> & {