shadcn.io is not affiliated with official shadcn/ui
Refund Ladder FAQ Block for React
A tour operator's FAQ with a refund ladder in a card: a Slider over days before departure marks the step you are on, full refund, credit or none, beside seven questions about booking and baggage.
Installation
Overview
An FAQ for React with Base UI. At the top, the title and a sentence sit at the start and a card sits at the end: a Slider over "days before departure" drives a three-step refund ladder, full refund, credit or no refund, and the step you're on is marked with a check while the others stay in view. The terms are labelled as examples. Seven questions about booking, baggage and groups follow in hairline rows, each with an arrow that turns when it opens. On a phone the card sits under the header and the ladder shows the details of the step you are on. It's built from Slider, Accordion and Guides, with CSS transitions for the entrance and your theme's tokens for every colour. For tour operators, airlines and venues whose refunds depend on how far ahead you cancel.
FAQ
How do I change the terms?
Edit FULL_FROM and CREDIT_FROM at the top of the file: the number of days from which a booking is refunded in full, and from which it becomes credit. STEPS holds the words of each step, and its day ranges are built from those two numbers, as is the first answer, so nothing drifts. MAX_DAYS is the end of the Slider and FIRST_DAYS where it starts.
How does the Slider work?
It's our Slider with one thumb, one day a step, and a foreground-coloured track so the page's one primary colour stays on a call to action elsewhere. Drag it or use the arrow keys, Page Up and Page Down for bigger jumps, and Home and End for the ends. The days read out beside its label, and the ladder updates at once.
What do screen readers hear?
The thumb is named "Days to departure" and its value text is a full sentence, "30 days before departure: credit.", so each move reads out where you landed. The ladder is an ordered list with the current step marked aria-current="step", and the status dots are decoration.
Are the closed answers in the page's markup?
Yes. The Accordion takes hiddenUntilFound, so every closed answer stays in the markup as hidden="until-found", and the browser's find in page opens the answer that holds a match. The ladder and Slider are state, so only the questions are in the markup.
Related
- Pro
Reading Progress FAQ
Reading and sharingA FAQ for a safety-training platform with a reading tracker: a ring that fills as questions are opened, a check on each row you've read, and a Shine Button once all eight are read.
- Pro
Topic Select FAQ
Topics and filtersA short FAQ for a bike-share with a topic Select at the end of its header: choose a topic and its questions fill the rows below, or choose All topics for all twelve.
- Pro
Accordion FAQ
Accordion listsA side-header FAQ for a web analytics tool: the title, one sentence and a contact prompt beside seven questions in an accordion, behind a split divider.
- Pro
Status FAQ
Proof and freshnessAn FAQ for a hosting platform where each question belongs to a service and shows that service's state, with a summary counted from the rows.
- Pro
Spend Cap Pricing
CalculatorsSpend controls as a selling point: a circular gauge of spend against a monthly cap set with a slider, email alerts at 50, 80 and 100% of the cap, and the choice of pausing jobs or keeping them running when the cap is reached.
- Pro
Timeline FAQ
Steps and plansA version-history FAQ for a developer toolkit: six accordion rows down a hairline rail with a dot and a version for each release, the newest one ringed and badged.