daandelange / tabsfield
A tabs field for the panel, to use with `when` conditions in field and section blueprints.
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 19
Watchers: 2
Forks: 0
Open Issues: 0
Language:Vue
Type:kirby-plugin
pkg:composer/daandelange/tabsfield
Requires
This package is not auto-updated.
Last update: 2025-10-30 09:18:14 UTC
README
A tabs field for the panel, to use with when conditions in field and section blueprints.
Features:
- Uses the native
k-tabspanel component (slightly extended). - Remembers the last open tab (using the browser's local storage).
- The field value is never saved in the content file (but present in the panel's form values).
- The field value is available for usage with
whenconditions (javascript). - Tabs can have labels and icons.
Note: As of version 1.0.0, this plugin doesn't use KirbyContentHackModule anymore. Thanks to Kirby4 panel changes, the implementation is way cleaner now.
Requirements
Please refer to the following Kirby version compatibility table.
| Kirby version | TabsField version |
|---|---|
| Kirby 3.6+ | TabsField 0.1.0-beta+ |
| Kirby 4.0+ | Unsupported |
| Kirby 5.0+ | TabsField 1.0.1+ |
Installation
- Manually: Download and copy this repository to
/site/plugins/tabsfield. - Git submodule:
git submodule add https://github.com/daandelange/kirby-tabsfield.git site/plugins/tabsfield - Composer:
composer require daandelange/tabsfield
Setup
Everything is scriptable trough blueprints.
- Add one or multiple
tabsfield(s) to your fields sections, providing each of them with sometabs. More information on native Kirby Tabs.
*Note: As any kirby field, every tab field must have a unique key within your blueprint setup. - Add corresponding
when:conditions to your fields and/or sections.
Example / Tutorial:
sections: fields: type: fields sticky: true fields: sidebartab: type: tabs # Tabs must have a name and a both optional label and icon tabs: - name: metainfo icon: tag label: Info - name: files icon: file label: Files categories: type: tags label: Categories # Shows this individual field when the metainfo tab is active when: sidebartab: metainfo author: type: users label: Author min: 1 required: true # Shows this individual field when the metainfo tab is active when: sidebartab: metainfo files: type: files headline: File Manager # Shows this individual field when the files tab is active # (the same can be done with a files section) when: sidebartab: files
Options
There are no options available yet. Would you like to contribute some ?
Development
pnpm install: Install the required dependencies.pnpm run dev: Develop mode (listen/compile).pnpm run build: Compile for publishing.
License
MIT - Free to use, free to improve !
However, for usage in commercial projects, please consider to improve the plugin a little and contribute back the changes with a PR, or hire someone to do so.
Credits
In loving memory of the Kirby 2 alternative : Kirby-Tabs-Field by @afbora.
Author: Daan de Lange
