Info Icon Tooltips
A dense FAQ list where each question sits next to a small info icon button. Hovering or focusing that icon reveals the answer in an absolutely-positioned tooltip panel beneath the row, keeping the resting layout extremely compact while still making every answer reachable by keyboard.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/info-icon-tooltips.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/faq/faq48.tsx instead.
Usage
The file also exports faq48Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.
import { Faq48, faq48Demo } from "@/components/blocks/faq/faq48"; export default function Page() { return <Faq48 {...faq48Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | "Frequently asked questions" | Section heading. |
| description | string | none | Optional supporting copy under the heading. |
| faqs | FaqTooltipItem[] | none | List of question/answer pairs, one info icon per row. |
| className | string | none | Extra classes for the outer section element. |
Types
interface FaqTooltipItem { question: string; answer: string; }
Behavior notes
- Real client behavior: an openIndex state tracks which row's info button is currently hovered or keyboard-focused, and only that row's tooltip renders.
- The tooltip button uses onMouseEnter/onMouseLeave and onFocus/onBlur together so the answer is reachable both by mouse and by keyboard, with aria-expanded reflecting the open state.
More FAQ Blocks
View all →collapsible-accordion
Collapsible Accordion
Stacked cards with expandable sections, for full-length answers in a compact format.
open-list-layout
Open List Layout
Questions with answers displayed directly below in a simple always-open list.
three-column-grid
Three Column Grid
Q&A pairs arranged in a responsive grid layout, always open.
tabbed-categories
Tabbed Categories
Sidebar navigation with category tabs and an accordion of that category's questions.
searchable-accordion
Searchable Accordion
Search input that filters accordion items in real-time by question and answer text.
grouped-sections
Grouped Sections
FAQs organized into titled sections, each with its own independent accordion below it.