sbp-tag-multi-select
v1.0.0
Published
A Strapi plugin that provides a custom field for selecting tags or multiple options (multi-select) easily, using The Strapi Design System for the UI.
Readme
Tag / Multi-Select Field By Strapi Backend Pack
sbp-tag-multi-select is a Strapi plugin that provides a custom field for selecting tags or multiple options (multi-select) easily, using The Strapi Design System for the UI.
Features
Custom Field for Tag / Multi‑Select
Allows administrators to select multiple tags from a predefined list.Supports Predefined Options Configuration
Users can define options as a JSON string through the Content-Type Builder, which will be parsed and displayed in the input component.Stores Data in JSON Format
When saving data, the system stores the value in the format{"data": [ ... ]}, ensuring proper support for storing an array of tags.
Installation
You can install this plugin via npm or yarn:
Using npm
npm install sbp-tag-multi-selectUsing yarn
yarn add sbp-tag-multi-selectAfter installation, edit the config/plugins.js file of your Strapi project as follows:
module.exports = ({ env }) => ({
// ... plugin อื่น ๆ
'sbp-tag-multi-select': {
enabled: true
},
});Configuration
Configuration in Content-Type Builder
When adding a custom field through the Content-Type Builder, select:
- Type: Custom Field
- Custom field: Tag / Multi‑Select (sbp‑tag‑multi‑select)
- Define the desired options in the Predefined Options section
Example JSON to be entered in the options field:
Additionally, you can set the label and placeholder for this custom field in the plugin options[ { "value": "tag1", "label": "Tag 1" }, { "value": "tag2", "label": "Tag 2" } ]
Usage
- When opening the content editing page (Content Manager) in the field that uses this custom field, the system will display a MultiSelect to select tags from the predefined options.
- When data changes, the system will send the value in the format:
which Strapi will save in the database as defined in the schema.{"data": ["tag1", "tag2"]}
License
This project is licensed under the MIT License.
