content
Accordion Item
Single item for accordion content with title, rich text body, and optional icon.
#accordion#item#faq#content
Storyblok Schema
json
{
"$bloktastic": {
"version": "1.0.0"
},
"name": "accordion_item",
"display_name": "Accordion Item",
"is_root": false,
"is_nestable": true,
"schema": {
"title": {
"type": "text",
"pos": 0,
"display_name": "Title",
"description": "Question or heading text",
"required": true
},
"content": {
"type": "richtext",
"pos": 1,
"display_name": "Content",
"description": "Expandable answer or body content",
"required": true
},
"icon": {
"type": "asset",
"pos": 2,
"display_name": "Icon",
"description": "Optional icon shown next to title"
}
},
"preview_field": "title"
} Generation Prompt
md
# Accordion Item
## Purpose
Single item for accordion content with title, rich text body, and optional icon.
## Storyblok Schema Fields
- `title` (text, required): Question or heading text
- `content` (richtext, required): Expandable answer or body content
- `icon` (asset): Optional icon shown next to title
## Visual Requirements
- Design for responsive marketing pages (mobile, tablet, desktop).
- Keep spacing and hierarchy clear for conversion-focused sections.
- Support optional content gracefully without visual gaps.
## Accessibility
- Use semantic sectioning and heading structure.
- Ensure interactive elements are keyboard reachable with visible focus states.
- Maintain WCAG-compliant contrast in all supported styles.
## Example Props Structure
```typescript
interface AccordionItemProps {
// Map Storyblok fields to your frontend props here
}
```
## Edge Cases
- Missing optional media or links.
- Extremely long text content.
- Empty collections in nested blok fields.
README
md
# @bloktastic/accordion-item
Single item for accordion content with title, rich text body, and optional icon.
## Installation
```bash
bloktastic add @bloktastic/accordion-item
```
## Fields
| Field | Type | Required | Description |
|---|---|---|---|
| title | text | Yes | Question or heading text |
| content | richtext | Yes | Expandable answer or body content |
| icon | asset | No | Optional icon shown next to title |
## Notes
- Category: `content`
- Tags: `accordion`, `item`, `faq`, `content`