Skip to main content
  {
    "type": "search",
    "name": "post",
    "label": "Post",
    "request_url": "https://example.com/path/to/your/search/endpoint",
    "placeholder": "Select a post", // optional
    "required": true, // optional
    "help": "help text shown in tooltip to creator while editing", // optional
    "multiselect": false, // optional
    "dependencies": [
      {
          "field": "dependent_field",
          "value": "dependent_value" //optional
      }
    ] // optional
  }
  {
    "settings": {
      "post": "post-id-123"
      // ...additional plugin settings
    }
    // ...plugin-specific additional data
  }
The search input allows creators to search and select from dynamic content sourced from external APIs or databases. It provides real-time search functionality with debounced requests, supports dependencies on other form inputs, and can handle both single and multiple selections. This component is ideal for selecting blog posts, products, categories, or any searchable content. example search input

Compatibility

Plugin typeAvailablityAdditional notes
Content blocks
Media source

Request URL behaviour

The behaviour of the request_url property is specific to the plugin environment in which it is used. The sections below outline the differences between plugin environments:
  • Initial load: When a creator adds a content block, Kit makes a request with an empty search parameter to populate default results
  • User typing: Debounced request made by Kit with the user’s search query
  • Draft restoration: If a creator leaves their email in a draft state and edits again in the future, we’ll make a request to your provided request_url with the value of the option they had previously selected. This allows us to fill the dropdown with your user-friendly label.
Your endpoint should return an array of label-value pairs:
{
  "data": [
    {
      "label": "A post title",
      "value": "post-id-123"
    }
  ]
}
For error handling, include an errors array:
{
  "data": [],
  "errors": ["Plan not found"]
}
COMING SOON

Properties

type
string
required
search - the type of the component
name
string
required
A unique internal-only identifier that is posted to an app’s plugin server to share values inputted by the creator
label
string
required
Creator-facing identifier that is shown in the plugin environment
request_url
string
required
The endpoint URL that Kit will call to fetch search results
placeholder
string
Placeholder text displayed in the search input field
required
boolean
Determines whether the creator must make a selection before proceeding
help
string
Brief creator-facing explanation that clarifies the component’s purpose and usage
dependencies
object array
Allows for the field to be shown conditionally. dependent on other fields. See dependencies page for more details.
We maintain backwards compatibility for string arrays but recommend using the object format going forwards.
multiselect
boolean
Enables multiple selection when set to true

Best practices

  • Ensure the initial empty state is handled, offering default options when no input is given
  • Use a sensible sort order for your data - for example alphabetical, most recently created or most popular
  • Ensure labels are clear, short and unique so that creators know exactly what they are selecting
  {
    "type": "search",
    "name": "post",
    "label": "Post",
    "request_url": "https://example.com/path/to/your/search/endpoint",
    "placeholder": "Select a post", // optional
    "required": true, // optional
    "help": "help text shown in tooltip to creator while editing", // optional
    "multiselect": false, // optional
    "dependencies": [
      {
          "field": "dependent_field",
          "value": "dependent_value" //optional
      }
    ] // optional
  }
  {
    "settings": {
      "post": "post-id-123"
      // ...additional plugin settings
    }
    // ...plugin-specific additional data
  }
I