Free block
Content / Help center
Help center / Essential edition
Help center with compact layout, responsive composition and local interaction.
"use client";
import { useState } from "react";
import {
Button,
Card,
SearchInput,
Accordion,
AccordionItem,
AccordionTrigger,
AccordionContent,
} from "@pimolu/react";
export function CompactContentHelpCenterBlock() {
const [message, setMessage] = useState("");
const [query, setQuery] = useState("");
const [topic, setTopic] = useState("All");
const articles = [
{
title: "Invite a teammate",
topic: "Teams",
body: "Open People, choose a role and send an invitation from your application.",
},
{
title: "Update your profile",
topic: "Account",
body: "Open Settings, edit your display name and save your profile.",
},
{
title: "Find an order",
topic: "Orders",
body: "Open order history and search using your confirmed order number.",
},
];
const visible = articles.filter(
(a) =>
(topic === "All" || a.topic === topic) &&
(a.title + " " + a.body).toLowerCase().includes(query.toLowerCase()),
);
return (
<section className="mx-auto max-w-6xl space-y-8 p-5 sm:p-10">
<header>
<h2 className="text-2xl font-semibold tracking-tight sm:text-3xl">
Help center
</h2>
</header>
<div className="mx-auto max-w-3xl space-y-6">
<SearchInput
label="Search support topics"
value={query}
onValueChange={setQuery}
className="w-full"
/>
<div className="flex flex-wrap gap-2">
{["All", "Account", "Teams", "Orders"].map((x) => (
<Button
key={x}
appearance={topic === x ? "solid" : "outline"}
aria-pressed={topic === x}
onClick={() => setTopic(x)}
>
{x}
</Button>
))}
</div>
<Accordion type="single" collapsible>
{visible.map((a) => (
<AccordionItem key={a.title} value={a.title}>
<AccordionTrigger>{a.title}</AccordionTrigger>
<AccordionContent>
<div className="space-y-4 py-3">
<p>{a.body}</p>
<Button
appearance="outline"
onClick={() => setMessage("Thanks for your feedback on " + a.title)}
>
This helped
</Button>
</div>
</AccordionContent>
</AccordionItem>
))}
</Accordion>
<Card className="space-y-3 p-5">
<h3 className="text-xl">Still need a hand?</h3>
<Button
appearance="outline"
onClick={() =>
setMessage("Support request prepared locally. Connect your help desk.")
}
>
Prepare support request
</Button>
</Card>
</div>
{visible.length === 0 && <p>No support topics match. Try another search.</p>}
<p role="status" className={message ? "text-sm text-muted" : "sr-only"}>
{message}
</p>
</section>
);
}Make it part of your product.
This is the source used by the preview, with Pimolu components and Tailwind layout utilities. Load the shared Pimolu stylesheet and your own Tailwind setup. Replace sample destinations with your routes. Form and billing previews use local sample state; connect your own application services.
Built with Button · Card · SearchInput · Accordion · AccordionItem · AccordionTrigger · AccordionContent