shadcn.io is not affiliated with official shadcn/ui
Fee Guide FAQ Block for React
A FAQ for a law firm with a matter-type fee guide beside its title: a select of four matters over the typical cost, time, who leads and what an instalment plan comes to, then seven numbered questions.
Installation
Overview
A fee guide FAQ for React with Base UI. A title and one sentence sit at the start of a band and a card in card sits at its end: a select of four matter types, Employment, Tenancy, Wills and Small claims, over four facts for the chosen one, its typical cost, how long it takes, who leads it and what an instalment plan comes to each month. The guide keeps its height whatever you choose, so nothing below moves. The costs and the instalments are worked out from one typed table, and a quiet line says the figures are examples. Seven questions follow in hairline rows under a rule that runs rail to rail, each numbered with a section sign. On a phone the guide stacks under the title. It's built from Accordion, Select, Data List and Guides, with your theme's tokens for every colour. For law firms, accountants, clinics and any service that quotes by the kind of job.
FAQ
How do I change the matters and the figures?
Edit MATTERS at the top of the file: each matter has a value, a label, the typical cost at the bottom and the top in cents, how long it takes, who leads it and how many months a fixed fee can be spread over. The instalment is the lowest typical cost divided by those months, rounded up to a whole dollar, so it is never more than the sum says. The select, the four facts and the answer about instalments all read from the same table.
How does the select work?
The Select takes MATTERS as its items and a string value: choosing a matter sets it and the facts change at once.
It is named "Matter type", opens with Enter, Space or the Down arrow, and a polite status that only a screen reader sees says "Wills: typically $450 to $1,200, 1 to 2 weeks" after each change.
How are the amounts written, and what about right-to-left layouts?
Money is formatted by one Intl.NumberFormat for US dollars, shown as whole dollars, and each range or instalment sits in a dir="ltr" span so "$2,400 to $6,500" keeps its order in right-to-left layouts. The section signs are decorative and hidden from assistive technology; the questions' order carries the same information.
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". One answer is open at a time.
How does it work with a keyboard?
Tab moves from the select to the first question and on down the rows; Enter or Space opens one. Each question is a button inside its own h3 under the section's h2.
How does it fit on a phone?
Below the lg breakpoint the title comes first, the guide follows with the select across its full width, and the questions run from rail to rail. The values are short on purpose, so no matter wraps differently from another and the guide's height never changes. Nothing scrolls sideways at 320 pixels.
Related
- 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
Fee Calculator FAQ
Calculators and toolsA FAQ for a business bank whose first answer is a fee calculator: an amount field and a three-way speed control show the fee, the total and the arrival time, beside five questions on safety and limits.
- Pro
Deductible Slider FAQ
Calculators and toolsA FAQ for a home contents insurer with a deductible explainer above the questions: a slider over four deductibles moves two bars, the monthly premium and the most you pay in a year.
- Pro
Pricing With FAQ
Proof and guaranteesPlans answered by the pricing FAQ for an e-commerce builder: a compact plan list, a row each with its name, price and call to action, beside an accordion of six questions with the first one open, in one ruled band.
- Pro
Annotated Invoice FAQ
Charts and documentsA FAQ that explains its own invoice: seven numbered questions beside a framed mock invoice, where opening a question rings the line it explains and mutes the rest.
- Pro
Procurement Pack FAQ
Calculators and toolsA FAQ for a data platform with a procurement pack beside the questions: three documents as checkboxes with a live count, an email field and one Shine Button that requests what is ticked.