Back to all examples

Show a list to help answer a question

ReactAngularWeb Components
const handleChange = (event: GoabRadioGroupOnChangeDetail) => {
    console.log("value is", event.value);
  };
<form>
      <GoabFormItem
        label="Do you have additional education expenses?"
        helpText="You can request funding for these now or at any time during your program."
        mb="m">
        <GoabRadioGroup name="additional" onChange={handleChange}>
          <GoabRadioItem label="Yes" value="yes" name="additional" />
          <GoabRadioItem label="No" value="no" name="additional" />
        </GoabRadioGroup>
      </GoabFormItem>

      <GoabDetails heading="What are additional education expenses?">
        <GoabBlock gap="m" mt="m">
          <div>
            <strong>Examples of education expenses</strong>
            <ul className="goa-unordered-list">
              <li>Laptop and computer hardware</li>
              <li>Computer apps and subscriptions</li>
              <li>Home internet</li>
              <li>Testing and exam fees</li>
              <li>Work or school clothing, like work boots</li>
            </ul>
          </div>
          <div>
            <strong>Do not include</strong>
            <ul className="goa-unordered-list">
              <li>Tuition</li>
              <li>Mandatory fees</li>
              <li>Books and supplies</li>
              <li>School association fees</li>
            </ul>
          </div>
        </GoabBlock>
      </GoabDetails>
    </form>

Show a list to help answer a question using an expandable details component.

When to use

Use this pattern when:

  • Users need clarification about what items qualify for a question
  • You want to provide examples of what to include or exclude
  • The guidance content would clutter the form if always visible
  • Users can make better decisions with reference information

Considerations

  • Place the details component after the form question it relates to
  • Use clear headings within the details to organize content
  • Include both “examples of” and “do not include” lists when relevant
  • Keep the details heading phrased as a question to indicate it provides clarification
  • Ensure the expanded content is easy to scan with clear formatting