Elastic Pull

Elastic pull FAQ with spring physics.

Main Features of Elastic Pull

How to Use Elastic Pull in Next.js

Installation Guide for Elastic Pull

Props

Customize the component with these props

PropertyTypeDefaultDescription
faqs
Array<{id: number, q: string, a: string}>[]Array of FAQ items with id, question (q) and answer (a).
backgroundColor
string#171717Background color (hex, rgb, or hsl).
cardBgColor
string#262626Card background color.
cardTextColor
string#ffffffCard text color.
dragHintColor
string#737373Drag hint text color.
answerBgColor
string#171717Answer background color.
answerTextColor
string#d4d4d4Answer text color.
answerBorderColor
string#404040Answer border color.
dragLeftColor
string#ff0055Background color when dragging left.
dragRightColor
string#0055ffBackground color when dragging right.
dragCenterColor
string#262626Background color when centered.

When to Use

Excellent for mobile-first applications, playful landing pages, and Next.js sites that want a tactile, 'stretchy' aesthetic. Use this React component for an FAQ section where answers are revealed through elastic 'pull-to-open' interactions and spring-based physics.

Best Practices

Maintain consistent spacing within your design system by using it as a secondary information layer. Follow React best practices by pairing it with clear drag indicators. Optimize for performance by using Framer Motion's hardware-accelerated spring animations.

Why This Component Matters in Modern UI Development

Elastic interactions feel more natural and responsive to swipe gestures. This production-ready component helpsคุณ build an interface that feels modern and lightweight, improving the joy of small interactions (micro-interactions) in your project.

Frequently Asked Questions

QHow does the pull reveal work?

Users can drag the FAQ card horizontally; as it stretches, it changes color and reveals high-priority actions or the answer layer.

QIs the spring physics customizable?

Yes, you can control the stiffness and damping of the pull effect to make it feel more or less 'snappy'.

QCan I use it for left/right actions?

The component supports independent background colors for both left and right drag directions, allowing for versatile 'swipe-to-action' patterns.

Elastic Pull - React FAQ & Accordion Component | Uilora