Components
- AccordionNew
- Alert
- Alert DialogNew
- AutocompleteNew
- AvatarNew
- Badge
- Breadcrumb
- Button
- CalendarNew
- CardNew
- Checkbox
- Checkbox GroupNew
- CollapsibleNew
- ComboboxNew
- CommandNew
- Context MenuNew
- Date PickerNew
- DialogNew
- DrawerNew
- EmptyNew
- FieldNew
- FieldsetNew
- FormNew
- FrameNew
- GroupNew
- Input
- Input GroupNew
- KbdNew
- Label
- MenuNew
- MeterNew
- Number Field
- OTP FieldNew
- Pagination
- PopoverNew
- Preview CardNew
- Progress
- Radio Group
- Scroll AreaNew
- Select
- Separator
- SheetNew
- SkeletonNew
- Slider
- Spinner
- StepperNew
- Switch
- Table
- TabsNew
- Textarea
- ToastNew
- ToggleNew
- Toggle GroupNew
- ToolbarNew
- Tooltip
Accordion
An accordion block for FAQ-style content — a list of rows, each with a title, an optional tag and its panel content.
Frequently asked questions
The questions we hear most often.
import {
AccordionBlock,
type AccordionBlockItem,
} from "mako-ui/blocks/accordion";
const items: AccordionBlockItem[] = [
{
content: (
<p>
Three criteria determine the useful life of a safety helmet: the shell
material, exposure to UV and temperature, and the date it entered
service.
</p>
),
tagLabel: "Popular",
title: "How is the lifespan of a helmet calculated?",
},
{
content: (
<p>
The shell carries a moulded manufacturing date. Storage life runs from
that date, service life from first use.
</p>
),
title: "Where do I find the manufacturing date?",
},
{
content: (
<p>
A visual check before every use, and a documented audit at every
equipment renewal.
</p>
),
title: "How often should a helmet be inspected?",
},
];
export default function Particle() {
return (
<AccordionBlock
items={items}
subtitle="The questions we hear most often."
title="Frequently asked questions"
/>
);
}
Props
AccordionBlock
| Prop | Type | Default | Description |
|---|---|---|---|
items | AccordionBlockItem[] | — | The rows. The block renders nothing when the list is empty. |
multiple | boolean | false | Allow several rows to stay open at once. |
title | string | — | Optional section heading, rendered as an h2. |
subtitle | string | — | Optional line under the heading. |
id | string | — | Id of the section, and the prefix every element id inside is derived from. |
AccordionBlockItem
| Prop | Type | Default | Description |
|---|---|---|---|
title | string | — | The row's label. |
content | ReactNode | — | The panel content: prose, a list, a link. |
tagLabel | string | — | Optional yellow pill rendered next to the chevron. |
Examples
Multiple rows open
Several rows can stay open at once, and the section header is optional.
import {
AccordionBlock,
type AccordionBlockItem,
} from "mako-ui/blocks/accordion";
const items: AccordionBlockItem[] = [
{
content: <p>Cutting tools, abrasives, and machining accessories.</p>,
title: "Machining",
},
{
content: <p>Helmets, gloves, eyewear and hearing protection.</p>,
title: "Personal protection",
},
{
content: <p>Bearings, belts, chains and transmission components.</p>,
title: "Power transmission",
},
];
export default function Particle() {
return <AccordionBlock items={items} multiple />;
}