kesabr / kirby-collapse-section
A Kirby plugin that adds a collapse section to the panel
Package info
github.com/kesabr/kirby-collapse-section
Language:JavaScript
Type:kirby-plugin
pkg:composer/kesabr/kirby-collapse-section
1.0.0
2026-06-03 15:06 UTC
Requires
README
A Kirby CMS panel plugin that lets you group fields inside a collapsible section. Editors can expand and collapse the section with a single click, and the open/closed state is remembered per section in the browser.
Features
- Wrap any set of panel fields in a toggle-able section
- Configurable label and default collapsed state via blueprint
- Per-section open/closed state persisted in
localStorage - Animated chevron indicator
- Fully keyboard-accessible toggle button
Installation
Composer
composer require kesabr/kirby-collapse-section
Manual
Download or clone this repository and place it in site/plugins/kirby-collapse-section.
Usage
Add a section of type collapse to any blueprint:
# site/blueprints/pages/example.yml sections: advancedSettings: type: collapse label: Advanced Settings collapsed: true fields: seoTitle: type: text label: SEO Title seoDescription: type: textarea label: SEO Description
Options
| Option | Type | Default | Description |
|---|---|---|---|
label |
string |
Section |
Heading shown on the toggle button |
collapsed |
bool |
false |
Whether the section starts collapsed. Overridden by any previously stored state from the user's browser. |
fields |
array |
[] |
Standard Kirby field definitions to render inside the section |
Requirements
- Kirby CMS 4+
License
MIT — © Kenan Brunner