A custom field plugin for Strapi that provides a sortable list of strings with an intuitive interface for content creators.
- ✨ Easy to use: Simple interface to add, remove, and reorder string items
- 🎯 Drag-free sorting: Use arrow buttons to move items up and down
- 🔧 Configurable: Set minimum and maximum number of items
- ✅ Validation: Built-in required field validation
- 📱 Responsive: Works seamlessly in the Strapi admin panel
- 🎨 Native design: Follows Strapi's design system
npm install strapi-string-list-fieldyarn add strapi-string-list-fieldpnpm add strapi-string-list-fieldAfter installation, the plugin will automatically register a new custom field type called "String List" in your Strapi admin panel.
- Go to Content-Types Builder in your Strapi admin panel
- Select the content type you want to add the field to
- Click Add another field
- Select Custom tab
- Choose String List
- Configure your field options
- Save and restart your application
The String List field supports the following options:
- Required field: Make the field mandatory for content creation
- Minimum items: Set the minimum number of items required
- Maximum items: Set the maximum number of items allowed
The String List field provides an intuitive interface where users can:
- Add items: Type in the input field and press Enter or click the "Add" button
- Remove items: Click the trash icon next to any item
- Reorder items: Use the up/down arrow buttons to move items
- View items: All items are displayed in a scrollable list
The field stores data as a JSON array of strings. Here's how to work with it in your API:
// POST /api/your-content-type
{
"title": "Example Content",
"tags": ["JavaScript", "React", "Strapi", "Plugin"]
}// GET /api/your-content-type
{
"data": [
{
"id": 1,
"attributes": {
"title": "Example Content",
"tags": ["JavaScript", "React", "Strapi", "Plugin"]
}
}
]
}// GET /api/your-content-type?filters[tags][$contains]=React- Strapi v5.27.0 or higher
- Node.js 18+
- React 18+
npm run buildnpm run watchnpm run test:ts:front # Frontend TypeScript
npm run test:ts:back # Backend TypeScriptstrapi-string-list-field/
├── admin/ # Frontend (admin panel)
│ ├── src/
│ │ ├── components/
│ │ │ ├── Initializer.tsx
│ │ │ ├── PluginIcon.tsx
│ │ │ └── StringListInput.tsx # Main input component
│ │ ├── translations/
│ │ │ └── en.json
│ │ ├── utils/
│ │ │ └── getTranslation.ts
│ │ ├── index.ts # Plugin registration
│ │ └── pluginId.ts
│ └── custom.d.ts
├── server/ # Backend
│ └── src/
│ ├── config/
│ ├── register.ts # Custom field registration
│ └── index.ts
└── package.json
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License.
If you encounter any issues or have questions:
- Check the GitHub Issues
- Create a new issue if your problem isn't already reported
- Contact us at contact@sysentive.com
- Initial release
- Basic string list functionality
- Sortable items with arrow controls
- Configurable min/max items
- Required field validation
Made with ❤️ by Sysentive