Can you add an entirely custom field type to Strapi?

Technically yes, but it’s somewhat of a hacky method right now until we support it natively (and we plan to in the future)

The best example of this would be a community guide on a color picker:

There is also a community package that did it as well: GitHub - strapi/awesome-strapi: A curated list of awesome things related to Strapi

The two key “gotchas” to this:

  • the columnType referenced here is the database column type, meaning this guide was written on a MySQL/MariaDB database, as PostgreSQL doesn’t have longtext (I think it’s just text)
  • You cannot use the content-type builder on a model with custom fields it will throw an error as the CTB doesn’t understand the field and it will get deleted or just throw an error if you try to modify the model with a custom field.
1 Like