Scroll Area Glass
shadcn-glass-ui/scroll-area-glassFreeComponent
Custom scrollable container with glass-themed scrollbars. * Built on @radix-ui/react-scroll-area for cross-browser consistency. * * ## Features
Install it
npx shadcn@latest add https://raw.githubusercontent.com/artyhoo/shadcn-glass-ui-library/main/public/r/scroll-area-glass.jsonSource
1/**2 * ScrollAreaGlass Component3 *4 * Custom scrollable container with glass-themed scrollbars.5 * Built on @radix-ui/react-scroll-area for cross-browser consistency.6 *7 * ## Features8 * - Custom glass-styled scrollbars with theme-aware colors9 * - Horizontal, vertical, or bidirectional scrolling support10 * - Auto-hide scrollbars with smooth fade transitions11 * - Cross-browser consistent scrollbar behavior via Radix UI12 * - Theme-aware styling with CSS variables13 * - Focus-visible states for keyboard navigation14 * - Compound component API for advanced use cases15 * - WCAG 2.1 AA compliant keyboard and screen reader support16 *17 * ## Sub-Components18 * - `ScrollAreaGlass` - Main scroll container (Root + Viewport)19 * - `ScrollBarGlass` - Individual scrollbar component20 * - `ScrollAreaGlassViewport` - Inner viewport for manual composition21 *22 * ## CSS Variables23 * Customize scrollbar appearance via theme CSS variables:24 * - `--scroll-thumb-bg` - Scrollbar thumb background color25 * - `--scroll-thumb-hover-bg` - Scrollbar thumb hover background color26 * - `--scroll-thumb-border` - Scrollbar thumb border color27 * - `--scroll-track-bg` - Scrollbar track/corner background color28 *29 * @example Vertical scrolling (default)30 * ```tsx31 * import { ScrollAreaGlass } from 'shadcn-glass-ui'32 *33 * function VerticalList() {34 * return (35 * <ScrollAreaGlass className="h-[400px] w-64">36 * <div className="space-y-2 p-4">37 * {items.map(item => (38 * <div key={item.id} className="p-2 rounded bg-[var(--card-bg)]">39 * {item.name}40 * </div>41 * ))}42 * </div>43 * </ScrollAreaGlass>44 * )45 * }46 * ```47 *48 * @example Horizontal scrolling49 * ```tsx50 * <ScrollAreaGlass className="w-96" orientation="horizontal">51 * <div className="flex space-x-4 p-4">52 * {cards.map(card => (53 * <div key={card.id} className="shrink-0 w-[200px]">54 * <Card {...card} />55 * </div>56 * ))}57 * </div>58 * </ScrollAreaGlass>59 * ```60 *61 * @example Both directions (2D scrolling)62 * ```tsx63 * <ScrollAreaGlass64 * className="h-[400px] w-full"65 * orientation="both"66 * >67 * <div className="min-w-[800px] p-4">68 * <LargeDataTable />69 * </div>70 * </ScrollAreaGlass>71 * ```72 *73 * @example Inside a card with header and footer74 * ```tsx75 * function ActivityCard() {76 * return (77 * <div className="rounded-xl border border-[var(--card-border)] bg-[var(--card-bg)]">78// … truncated
More from shadcn-glass-ui
All 76 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Alert Glassalert-glass | shadcn-glass-ui | Components | Free | no deps | |
| Animated Background Glassanimated-background-glass | shadcn-glass-ui | Components | Free | no deps | |
| Avatar Glassavatar-glass | shadcn-glass-ui | Components | Free | no deps | |
| Badge Glassbadge-glass | shadcn-glass-ui | Components | Free | no deps | |
| Base Progress Glassbase-progress-glass | shadcn-glass-ui | Components | Free | no deps | |
| Button Glassbutton-glass | shadcn-glass-ui | Components | Free | no deps | |
| Card Glasscard-glass | shadcn-glass-ui | Components | Free | no deps | |
| Checkbox Glasscheckbox-glass | shadcn-glass-ui | Components | Free | no deps |
