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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xbstracts/strapi-plugin-content-type-selector

v0.0.8

Published

A Strapi v5 custom field for selecting API content types and optionally choosing entries from those types.

Readme

Content Type Selector Plugin for Strapi v5

A Strapi v5 custom field that lets editors select API collection types and single types, with optional entry selection for the chosen content types.

Package Moved

The package has moved from strapi-plugin-content-type-selector to @xbstracts/strapi-plugin-content-type-selector. Please use the new package name for future installs and updates.

Features

  • Adds a Content Type Selector JSON custom field to the Strapi Content-Type Builder
  • Lists API collection types and single types from the current Strapi project
  • Supports single or multiple content type selection
  • Optionally lets editors choose one or more entries from each selected content type
  • Supports allowed content type filtering and default selected content types
  • Keeps selected content types and selected entries sortable when multiple selection is enabled
  • Shows draft and published entries with status labels

Installation

Install the package in your Strapi v5 project:

npm install @xbstracts/strapi-plugin-content-type-selector

Enable the plugin in config/plugins.ts:

export default () => ({
  'content-type-selector': {
    enabled: true,
  },
});

For local plugin development, place the plugin in src/plugins/content-type-selector, then enable it with a local resolve path:

export default () => ({
  'content-type-selector': {
    enabled: true,
    resolve: './src/plugins/content-type-selector',
  },
});

Build your Strapi admin after installation:

npm run build

Usage

  1. Open the Strapi Content-Type Builder.
  2. Add a custom field and choose Content Type Selector.
  3. Configure the field options for your content model.
  4. Open an entry in Content Manager and select the content type or types you want to reference.

When content selection is enabled, the field also lets editors select specific entries from each selected content type.

Field Options

Content Type Selection

  • Allow Multiple Content Types: lets editors select more than one content type. When disabled, the field stores a single content type UID.

Content Selection

  • Enable Content Selection: lets editors select entries from the chosen content type or types.
  • Allow Multiple Contents: lets editors select multiple entries per content type. When disabled, only one entry can be selected.

Advanced Settings

  • Allowed Content Types: limits the selector to specific content type UIDs, one per line.
  • Default Content Types: preselects content type UIDs when the field is empty, one per line.
  • Required field: requires at least one content type. When content selection is enabled, it also requires at least one selected entry.

Example UID list:

api::article.article
api::page.page
api::homepage.homepage

Stored Value

The custom field stores JSON. In single content type mode, the value looks like:

{
  "type": "api::article.article",
  "contents": ["abc123documentId"]
}

In multiple content type mode, the value stores an ordered list of content type UIDs and selected entries per type:

{
  "type": ["api::article.article", "api::page.page"],
  "contents": {
    "api::article.article": ["abc123documentId"],
    "api::page.page": ["def456documentId"]
  }
}

If content selection is disabled, contents is stored as an empty array or object depending on the content type selection mode.

License

MIT License