Marketing & Content
FAQ
A definition-list FAQ: each item is a question/answer pair in a faq-item wrapper; renderFaqItem renders a single entry.
- Element
<dl>- Module
@basenative/components- Function
renderFaq
Quick start
Import the render function and call it from your server template.
import { renderFaq } from '@basenative/components';
renderFaq({ items: [{ question: 'What does it cost?', answerText: 'One price per delivered lead.' }] });
Examples
Each block is a real server render — no mockups, no virtual DOM.
Question and answer pairs
A definition list: questions are escaped text; answers are an HTML slot, or escaped answerText when the answer is data.
renderFaq({
items: [
{ question: 'What does it cost?', answerText: 'One price per delivered lead.' },
{ question: 'When am I charged?', answer: 'When a qualified job is placed into your schedule.' },
],
})
Options
Arguments accepted by renderFaq().
| Option | Type | Default | Description |
|---|---|---|---|
items |
{ question, answer?, answerText? }[] |
[] |
Question (escaped) with an HTML answer slot or escaped answerText. |