medienbaecker / kirby-base-select
A select field for the Kirby Panel with icons, images, info, fonts and themes on every option
Package info
github.com/medienbaecker/kirby-base-select
Language:Vue
Type:kirby-plugin
pkg:composer/medienbaecker/kirby-base-select
Requires
- php: ~8.3.0 || ~8.4.0 || ~8.5.0
- getkirby/cms: ^6.0
- getkirby/composer-installer: ^1.2
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
A drop-in replacement for the Kirby select field. Every option can show an icon or image, a second line of info, its own font and a colour theme, in the field, in its dropdown and in structure and object tables.
Installation
composer require medienbaecker/kirby-base-select
Requires Kirby 6+ and PHP 8.3+. Without Composer, download this repository and copy it to site/plugins/kirby-base-select.
Usage
Use type: select as usual. Options take these keys on top of value and text:
status: type: select options: - value: draft text: Draft info: Not visible yet icon: circle-filled theme: negative - value: cover text: Cover image image: page.image("cover.jpg") - value: serif text: Georgia font: Georgia, serif
info: dimmed text after the labelicon: any Panel iconimage: a query for a page or file, or image settings likebackandiconfont: a CSS font family;monoandsans-serifuse the Panel fontstheme: a Panel theme likepositive,negativeorblue, which colours the icon
Structure and object tables show the same icon, image, info and font:
placeholderIcon sets an icon next to the placeholder.
Options from type: query and type: api accept the same keys as templates, e.g. icon: "{{ item.icon }}".
Browser support
The dropdown uses the customizable select (appearance: base-select) on devices with a mouse in browsers that support it. Everywhere else the field falls back to the native select, which shows the text and info but no icons, images or fonts.
License
MIT



