label: Accordion
status: ready
preview: '@uswds-framed'

variants:
  - name: default
    label: Borderless

  - name: bordered
    notes: >
      Add the `usa-accordion--bordered` class to your `.usa-accordion`
      to enable the visual border.
    context:
      accordion:
        id_prefix: b-
        variant: bordered

  - name: multiselectable
    notes: >
      You can allow multiple sections to remain open at the same time
      by adding the `aria-multiselectable="true"` attribute to your
      `.usa-accordion`.
    context:
      accordion:
        id_prefix: m-
        multiselectable: true

context:
  accordion:
    items:
      - title: First Amendment
        id: a1
        expanded: true
        content: |
          <p>Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.</p>
      - title: Second Amendment
        id: a2
        content: |
          <p>A well regulated Militia, being necessary to the security of a free State, the right of the people to keep and bear Arms, shall not be infringed.</p> <ul><li>This is a list item</li><li>Another list item</li></ul>
      - title: Third Amendment
        id: a3
        content: |
          <p>No Soldier shall, in time of peace be quartered in any house, without the consent of the Owner, nor in time of war, but in a manner to be prescribed by law.</p>
      - title: Fourth Amendment
        id: a4
        content: |
          <p>The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no Warrants shall issue, but upon probable cause, supported by Oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized.</p>
      - title: Fifth Amendment
        id: a5
        content: |
          <p>No person shall be held to answer for a capital, or otherwise infamous crime, unless on a presentment or indictment of a Grand Jury, except in cases arising in the land or naval forces, or in the Militia, when in actual service in time of War or public danger; nor shall any person be subject for the same offence to be twice put in jeopardy of life or limb; nor shall be compelled in any criminal case to be a witness against himself, nor be deprived of life, liberty, or property, without due process of law; nor shall private property be taken for public use, without just compensation.</p>
