-
Notifications
You must be signed in to change notification settings - Fork 6
Blocks Scroll Accordion
Version: 1.0.0 Category: Design Keywords: scroll, accordion, sticky, stacking
The Scroll Accordion block creates a stunning scroll-based stacking effect where content cards stack on top of each other as you scroll down the page. Cards appear to scale up and stick to the viewport, creating an engaging, modern scrolling experience that's perfect for presenting sequential content or storytelling.
Key Features:
- Smooth sticky stacking effect as users scroll
- Progressive reveal animation with scaling
- Customizable card alignment (left, center, right)
- Responsive and mobile-optimized
- Performance-optimized with reduced motion support
- Works seamlessly with other blocks as content
- Quick Start
- How It Works
- Settings & Configuration
- Common Use Cases
- Best Practices
- Troubleshooting
- Accessibility
-
Add the Scroll Accordion Block
- In the block editor, click the
+button - Search for "Scroll Accordion" or find it in the "Design" category
- The block comes pre-loaded with 3 example items
- In the block editor, click the
-
Customize Your Content
- Each item can contain any WordPress blocks (headings, paragraphs, images, buttons, etc.)
- Edit the default content or add/remove Scroll Accordion Items
- Style individual items using background colors, borders, padding, and shadows
-
Adjust Alignment
- Use the toolbar alignment buttons to position items left, center, or right
- Items will stack from this alignment point
-
Preview on Frontend
- Save and preview your page
- Scroll down to see the stacking effect in action
- Cards will scale up and stick as they reach the center of your viewport
The Scroll Accordion creates a vertical stack of content cards with a scroll-triggered animation:
As you scroll down the page:
- Cards below the viewport center start at 85% scale
- As cards approach the center, they scale up to 100%
- Cards stick to the viewport as you continue scrolling
- Previous cards remain stacked underneath
- The effect creates a layered, card-stacking appearance
Visual Effect:
- Cards appear to "slide under" the current card
- Smooth scaling transition as cards enter the viewport
- Creates depth and hierarchy
- Guides users through sequential content
-
Sticky Positioning: Uses CSS
position: stickyfor optimal performance - Scale Animation: JavaScript calculates scroll position and applies smooth scaling
- Viewport Center: Animation triggers based on viewport center position
- Reduced Motion: Automatically respects user's reduced motion preferences
-
Performance: Throttled with
requestAnimationFramefor smooth 60fps animation
The Scroll Accordion is a container block with minimal settings for maximum flexibility:
Choose how items align within the accordion:
- Left - Items align to the left edge
- Center - Items center within the container (default)
- Right - Items align to the right edge
When to Use:
- Left: Standard reading flow, text-heavy content
- Center: Visual impact, balanced layouts
- Right: Alternative layouts, creative designs
Set the overall block width:
- Default - Contained within content width
- Wide - Extends to wide width (if theme supports)
- Full - Full viewport width
Best Practice: Use Full or Wide width for maximum visual impact
The Scroll Accordion supports WordPress core settings:
Spacing:
- Margin: Space around the entire accordion
- Padding: Inner spacing (applied to container)
- Block Gap: Vertical space between stacked items
Color:
- Background: Container background color
- Text: Default text color for all items
- Gradient: Gradient background option
Typography:
- Font Size: Default font size for content
- Line Height: Default line height
Tips:
- Use Block Gap to control spacing between stacked cards
- Add padding for better mobile experience
- Background colors are best applied to individual items (not the container)
Goal: Present product features or services in an engaging scrolling experience
Setup:
- Add Scroll Accordion block
- Add 4-6 Scroll Accordion Items
- Each item highlights one feature
- Use icons, headings, and descriptions
- Apply different background colors to each item
- Add shadows for depth
Content Structure:
Scroll Accordion
├─ Item 1: Design Systems (dark blue background)
│ ├─ Heading: "Design Systems"
│ └─ Paragraph: Feature description
├─ Item 2: Component Library (darker blue)
│ ├─ Heading: "Component Library"
│ └─ Paragraph: Feature description
└─ Item 3: Launch & Scale (purple)
├─ Heading: "Launch & Scale"
└─ Paragraph: Feature description
Tips:
- Use contrasting backgrounds for visual interest
- Keep content concise (2-3 elements per item)
- Add generous padding to items
- Use large, bold headings
Goal: Tell a story or present chronological events
Setup:
- Add Scroll Accordion block
- Create one item per story section or timeline event
- Use consistent styling for cohesion
- Consider adding dates or numbers
- Include images or icons for visual interest
Example:
- Company history timeline
- Product development journey
- Step-by-step process
- Customer success story
Best Practices:
- Maintain visual consistency across items
- Use sequential or progressive color schemes
- Add subtle transitions between sections
- Keep scrolling rhythm comfortable
Goal: Highlight different services or pricing tiers
Setup:
- Add Scroll Accordion block
- One item per service or tier
- Include service name, description, features list
- Add call-to-action buttons
- Use distinct colors for different tiers
Content Per Item:
- Service name (Heading)
- Brief description (Paragraph)
- Key features (List)
- Pricing information
- CTA button
Goal: Showcase work or projects with immersive scrolling
Setup:
- Add Scroll Accordion block (Full width)
- One item per project
- Include project images, titles, descriptions
- Add background images with overlays
- Link to detailed case studies
Tips:
- Use large, high-quality images
- Add overlay colors for text readability
- Include project metadata (date, client, role)
- Keep descriptions scannable
DO:
- Keep items focused on one idea or feature
- Use 3-6 items for optimal effect (too many dilutes impact)
- Maintain consistent content structure across items
- Use compelling headlines that work in sequence
- Add visual elements (icons, images) for engagement
DON'T:
- Overload items with too much content
- Mix unrelated topics in the same accordion
- Use too many items (7+ can feel repetitive)
- Forget mobile users - test on smaller screens
- Use low-contrast text on backgrounds
Backgrounds:
- Use contrasting colors between items
- Consider color progression (light to dark, or themed)
- Test text readability on all backgrounds
- Add background images sparingly (can affect performance)
Spacing:
- Add generous padding to items (40-60px recommended)
- Use Block Gap to control stack spacing
- Ensure content doesn't feel cramped
- Test on mobile - reduce padding if needed
Typography:
- Use large, bold headings (2rem - 3rem)
- Ensure sufficient text contrast (WCAG AA minimum)
- Limit text length for scannability
- Use hierarchy (heading + description + optional details)
Optimize for Speed:
- Limit to 6-8 items maximum
- Compress images before adding
- Use appropriate image sizes (not unnecessarily large)
- Avoid background videos
- Test on mobile devices
Smooth Animation:
- Let the default scroll speed work
- Don't override with custom CSS animations
- Reduced motion users see static version automatically
- Test scrolling on different devices
Symptom: Items scroll normally without sticking
Possible Causes:
- Parent Container Overflow: A parent block is hiding overflow
- Z-Index Conflicts: Other elements have higher z-index
- CSS Conflicts: Theme or plugin CSS overriding
Solutions:
- Ensure parent containers allow overflow
- Check browser console for errors
- Try removing the block from nested containers
- Test with a default WordPress theme
Symptom: Scrolling feels laggy or stutters
Possible Causes:
- Too many items
- Large images not optimized
- Other heavy animations on page
- Device performance limitations
Solutions:
- Reduce number of items
- Compress and optimize images
- Remove background videos or animations
- Test on different devices
Symptom: Items don't align as expected
Solution:
- Check toolbar alignment setting
- Verify parent container width
- Ensure items don't have custom alignment set
- Check for theme CSS conflicts
Symptom: Text or content appears outside item boundaries
Solutions:
- Increase padding on items
- Check for absolute positioned elements
- Verify image sizes are responsive
- Test on mobile viewport sizes
The Scroll Accordion block is built with accessibility in mind:
- All content is accessible via keyboard
- Tab navigation works normally through content
- No keyboard traps
- Scroll animations don't interfere with navigation
- Content is in semantic HTML order
- No hidden content - everything is accessible
- Proper heading hierarchy preserved
- ARIA attributes not needed (standard scroll behavior)
Automatic Support:
- Detects
prefers-reduced-motionsetting - Disables scaling animation for sensitive users
- Items still stack, but without scale transitions
- Maintains full functionality without animation
Best Practices:
- Ensure text meets WCAG AA contrast ratios (4.5:1 for body text)
- Test all background/text combinations
- Use WordPress color system for consistency
- Avoid relying on color alone for information
- Touch targets are appropriately sized
- Content is readable on small screens
- Scroll performance optimized
- No horizontal scrolling required
Stack Block Integration:
Stack (Full Width)
└─ Scroll Accordion
├─ Scroll Accordion Item 1
├─ Scroll Accordion Item 2
└─ Scroll Accordion Item 3
Benefits:
- Stack provides section padding and background
- Scroll Accordion handles stacking effect
- Clean separation of concerns
Use the Custom CSS Extension for advanced styling:
/* Increase gap between stacked items */
.dsgo-scroll-accordion__items {
gap: 60px;
}
/* Add custom shadow to all items */
.dsgo-scroll-accordion-item {
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}
/* Adjust sticky position */
.dsgo-scroll-accordion-item {
top: 100px; /* Offset from top when stuck */
}Add dramatic visuals with background images:
- Add background image to Scroll Accordion Item
- Set overlay color in Color settings
- Adjust overlay opacity for text readability
- Use high-quality, optimized images
Q: How many items should I use? A: 3-6 items is ideal. More than 8 can feel repetitive and impact performance.
Q: Can I change the scroll speed? A: The scroll speed is optimized for smooth performance. Custom speeds aren't recommended as they can cause janky scrolling.
Q: Why don't I see the effect in the editor? A: The stacking effect only works on the frontend. Preview your page to see it in action.
Q: Can items be different widths? A: All items within one Scroll Accordion share the same alignment. For different widths, use multiple Scroll Accordion blocks.
Q: Does it work on mobile? A: Yes! The effect scales beautifully to mobile devices with optimized performance.
Q: Can I add videos inside items? A: Yes, but use sparingly as videos can impact scroll performance.
Q: How do I remove the default example items? A: Select each Scroll Accordion Item and delete it, then add your own.
Q: Can I nest Scroll Accordions? A: Not recommended - it creates confusing scroll behavior.
Q: Does it work with page caching? A: Yes! The scroll effect is JavaScript-based and works with all caching plugins.
Image Accordion: Expandable image panels with hover/click interactions Scroll Marquee: Infinite scrolling image galleries Stack: Flexible container for vertical layouts Modal: Interactive popups and dialogs
Need Help?
- GitHub Issues - Report bugs
- GitHub Discussions - Ask questions
- Documentation - Full wiki
Last Updated: 2025-11-19 DesignSetGo v1.0.0 WordPress 6.4+
Auto-generated from
docs/blocks/SCROLL-ACCORDION.md. To update, edit the source file and changes will sync on next push to main.
- Accordion
- Blobs
- Breadcrumbs
- Card
- Comparison Table
- Countdown Timer
- Counter Group
- Divider
- Flip Card
- Form Builder
- Grid
- Icon
- Icon Button
- Icon List
- Image Accordion
- Map
- Modal
- Modal Api Reference
- Modal Auto Triggers
- Modal Fse Compatibility
- Modal Gallery Navigation
- Modal Next Phase
- Modal Performance Fixes
- Modal Security Audit
- Modal Security Fixes Summary
- Modal Trigger
- Pill
- Progress Bar
- Reveal
- Row
- Scroll Accordion
- Scroll Gallery
- Scroll Slides
- Section
- Slider
- Sticky Sections
- Table Of Contents
- Tabs
- Timeline
- Animation
- Background Video
- Block Animations
- Clickable Group
- Custom Css
- Expanding Background
- Grid Mobile Order
- Grid Span
- Max Width
- Responsive Visibility
- Reveal Control
- Scroll Parallax
- Sticky Header
- Text Alignment Inheritance
- Text Reveal
- Ai Assisted Development
- Best Practices Summary
- Block Controls Organization
- Block Development Best Practices Comprehensive
- Block Exclusion Guide
- Control Reorganization
- Design System
- Wordpress Block Editor Best Practices
- Color Controls Pattern
- Custom Css Filters
- Performance Css Strategy
- Width Css Strategy Implementation
- Width Layout Patterns
- Antigravity Audit
- Card Block Audit
- Claude Audit
- Comprehensive Audit
- Cursor Audit
- Scroll Accordion Stacking Notes
- Security Review 1.2.1
- 2026 02 11 Icon Search Aliases Design
- 2026 02 14 Overlay Header Design
- 2026 02 15 Deactivation Block Migrator Design
- 2026 02 27 Product Categories Grid Design
- 2026 02 27 Product Categories Grid Plan
- 2026 03 07 Icon Aliases Single Source