{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "expandable-header-glass", "type": "registry:component", "title": "Expandable Header Glass", "description": "Collapsible section header with animated chevron for accordion-style interfaces.\n * Provides accessible expand/collapse controls with theme-aware styling.\n *\n * ## Features", "dependencies": [ "lucide-react", "react", "shadcn-glass-ui" ], "registryDependencies": [ "cn" ], "files": [ { "path": "components/glass/atomic/expandable-header-glass.tsx", "type": "registry:component", "content": "/**\n * ExpandableHeaderGlass Component\n *\n * Collapsible section header with animated chevron for accordion-style interfaces.\n * Provides accessible expand/collapse controls with theme-aware styling.\n *\n * ## Features\n * - **Chevron Animation:** Smooth rotation between ChevronUp/ChevronDown icons\n * - **Optional Leading Icon:** Customizable icon with configurable color\n * - **Controlled State:** Requires `expanded` prop for external state management\n * - **Hover Effect:** Subtle background highlight on hover (`bg-white/5`)\n * - **Theme-Aware:** Uses CSS variables for text and icon colors\n * - **ARIA Compliance:** `aria-expanded` attribute for screen readers\n * - **Keyboard Accessible:** Native button element with focus states\n * - **Flexible Layout:** Full-width button with space-between alignment\n * - **Atomic Component:** Extracted from FlagsSectionGlass for reusability\n *\n * ## CSS Variables\n * Uses inline theme CSS variables (no component-specific variables):\n * - `--text-primary` - Header title text color\n * - `--text-muted` - Chevron icon color\n * - `--text-accent` - Leading icon color (default, customizable via `iconColor`)\n *\n * @example Basic usage\n * ```tsx\n * import { ExpandableHeaderGlass } from 'shadcn-glass-ui'\n * import { Flag } from 'lucide-react'\n *\n * function CollapsibleSection() {\n * const [expanded, setExpanded] = useState(false)\n *\n * return (\n * <>\n * setExpanded(!expanded)}\n * />\n * {expanded &&
Section content...
}\n * \n * )\n * }\n * ```\n *\n * @example Without icon\n * ```tsx\n * \n * ```\n *\n * @example With custom icon color\n * ```tsx\n * import { AlertTriangle } from 'lucide-react'\n *\n * setWarningsExpanded(!warningsExpanded)}\n * />\n * ```\n *\n * @example With custom styling\n * ```tsx\n * \n * ```\n *\n * @accessibility\n * - Uses semantic `\n );\n }\n);\n\nExpandableHeaderGlass.displayName = 'ExpandableHeaderGlass';\n" } ], "categories": [ "atomic" ] }