Answer
An answer is anything that responds to a question, request, action, etc. Examples include FAQ replies, quiz answers, survey responses, and forum replies.
This headless component renders a <div> with class answer. The consumer supplies the answer content as children.
Props
label: string (optional) -- accessible label for the answerchildren: slot (required) -- answer content (body, citations, related links, action buttons)...restProps: Any additional HTML attributes
ARIA
aria-label-- describes the answer for screen readers when no visible heading is present
When to Use
- Use to pair with a
questionfor FAQ and Q&A patterns. - Use for quiz answer reveals or feedback panels.
- Use for forum replies displayed beneath the original question.
Related components
question— a question is anything that asks for information, invites a response, tests knowledge, etc.comment— a comment is anything that expresses an opinion, observation, explanation, etc.