import type { Meta, StoryObj } from '@storybook/web-components-vite'; import { html } from 'lit'; import './index.ts'; import type { USAAccordion, AccordionItem } from './usa-accordion.js'; const sampleItems: AccordionItem[] = [ { id: 'accordion-1', title: 'Getting Started', content: `
Welcome to our platform! Here's everything you need to know to get started:
Manage your account settings and preferences:
Get help when you need it:
This is a single accordion item with some content. You can put any HTML content here including lists, links, and other elements.
Our office hours are:
We are closed on national holidays.
`, expanded: false, }, { id: 'faq-2', title: 'How can I contact customer service?', content: `You can reach our customer service team through multiple channels:
Yes, we take data security very seriously. Our security measures include:
Read our complete Privacy Policy for more details.
`, expanded: false, }, { id: 'faq-4', title: 'How long does processing take?', content: `Processing times vary by service type:
| Service | Standard Processing | Expedited Processing |
|---|---|---|
| Document Requests | 5-10 business days | 2-3 business days |
| Permit Applications | 15-20 business days | 7-10 business days |
| Background Checks | 30-45 business days | 15-20 business days |
Note: Processing times may be longer during peak periods.
`, expanded: false, }, ], }, render: (args) => html`Technical specifications and implementation details:
| Property | Value |
|---|---|
| Version | 3.8.0 |
| Framework | Lit Element |
| CSS | USWDS Official |
Here are some practical examples:
const element = document.createElement('usa-accordion');
element.multiselectable = true;
Use these buttons to expand or collapse all accordion sections at once:
Note: This demonstrates using the default slot for custom content. You can add any HTML elements including buttons, forms, or additional information.