npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@tunghtml/strapi-plugin-composite-field

v1.1.6

Published

A Strapi v5 plugin to create composite display fields by combining multiple text, string, and enum fields with auto-generate support

Readme

Strapi Plugin Composite Field

A Strapi v5 plugin that creates composite display fields by combining multiple text fields.

Composite Field Demo npm version License

Features

  • 🔗 Multiple Fields: Combine any text/string/enum fields
  • 🔄 Generate Button: Click icon to generate composite value
  • Auto-Generate: Automatically update when source fields change
  • 🔒 Editable Control: Make field read-only or editable
  • 📝 Easy Config: Textarea input (one field per line)
  • ⚙️ Custom Separator: Configure separator (default: " - ")
  • Auto Spacing: Automatically adds spaces around separator
  • 🎨 Clean UI: Matches Strapi admin design system

Installation

npm install @tunghtml/strapi-plugin-composite-field

Then add the plugin to your config/plugins.js:

module.exports = {
  // ...
  "composite-field": {
    enabled: true,
  },
};

Rebuild your admin panel:

npm run build
npm run develop

Usage

1. Add Custom Field

  • Go to Content-Type Builder
  • Select your content type (e.g., Corp Rep List)
  • Click "Add another field"
  • Choose "Composite" from custom fields
  • Name it (e.g., displayName)

2. Configure Fields

Fields to combine (one per line):

salutation
firstName
lastName
email

Separator (optional, default: " - "):

-

3. Generate Value

  • Fill in source fields (firstName, lastName, email, etc.)
  • Click the Play icon button
  • Composite field populates automatically with proper spacing!

Examples

Representative Display Name

Fields:
  salutation
  firstName
  lastName
  email

Separator: -

Result: Mr. - Tung - Le - [email protected]

Product SKU

Fields:
  category
  brand
  model

Separator: -

Result: Electronics - Apple - iPhone15

Full Name

Fields:
  firstName
  lastName

Separator: (space)

Result: Tung Le

Configuration Options

Base Settings

| Option | Type | Default | Description | | ----------- | -------- | ------- | ------------------------------------- | | fields | textarea | - | Field names to combine (one per line) | | separator | text | " - " | Separator between fields |

Advanced Settings

| Option | Type | Default | Description | | -------------- | -------- | ------- | ------------------------------------------------ | | editable | checkbox | true | Allow manual editing of the composite field | | autoGenerate | checkbox | false | Automatically generate when source fields change |

Advanced Usage

Auto-Generate Mode

Enable Auto-generate in Advanced settings to automatically update the composite field when any source field changes. This is useful for fields that should always reflect the current values.

Read-Only Mode

Disable Editable in Advanced settings to make the composite field read-only. Users can only generate values using the button or auto-generate, but cannot manually edit the field.

Enum Field Support

The plugin now supports enumeration fields! Simply include the enum field name in your fields list, and the plugin will automatically extract the selected value.

Example:

Fields:
  meetingType (enum)
  name

Result: Panel Discussion - John Doe

Notes

  • Supports text, string, and enumeration fields
  • Automatically adds spaces around separator for clean output
  • Empty fields are skipped automatically
  • Relation fields are not supported (use simple fields only)
  • Auto-generate uses a 300ms debounce to avoid excessive updates

Requirements

  • Strapi v5.0.0 or higher
  • Node.js 18.x or higher

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Issues

If you encounter any issues, please report them at: https://github.com/finnwasabi/strapi-plugin-composite-field/issues

License

MIT

Author

Tung Le - @finnwasabi