Custom Integration

Canvas component reference

Every component type Canvas can render — text, button, input, dropdown, list, link, divider — with props, interaction payloads, and conditional visibility

Updated Dec 1, 2026

Canvas responses are arrays of component objects. Sleekplan also accepts a single object and wraps it in an array automatically. This page documents every supported component and how interactions post values back to your endpoint.

Response format

JSON
[
  { "type": "text", "text": "Hello", "style": "header" },
  { "type": "button", "id": "btn-1", "label": "Continue", "style": "blue", "action": { "type": "submit" } }
]

Every component has a type field; most have an id that is used as the key in interaction payloads.

Components

text

Renders a block of text. Use "header" for a prominent heading or "paragraph" for body copy.

type string · required

Must be "text".

text string · required

The string to display.

style string · required

Controls the visual treatment. Accepted values: "header" or "paragraph".

JSON
{ "type": "text", "text": "Search or create a DevOps item", "style": "header" }

No interaction — text components do not post values.

divider

Renders a horizontal rule to visually separate sections of the canvas.

type string · required

Must be "divider".

JSON
{ "type": "divider" }

No interaction.

button

Renders a clickable button. When clicked, Sleekplan posts { [id]: true } back to your endpoint.

type string · required

Must be "button".

id string · required

Unique identifier for this component. Used as the key in the interaction payload.

label string · required

Text displayed on the button.

style string · required

Visual style of the button. Use "blue" for a primary action button.

action object · required

Defines what happens when the button is clicked. Contains:

  • type — "submit" to post back to your Canvas endpoint, or "link" to navigate to a URL.
  • href — Required when type is "link". The URL to open.
JSON
{
  "type": "button",
  "id": "button-action-create",
  "label": "Create new item",
  "style": "blue",
  "action": { "type": "submit" }
}

Interaction: clicking the button posts { "button-action-create": true }.

input

Renders a single-line text input. Submitted value is posted as { [id]: <value> }.

type string · required

Must be "input".

id string · required

Unique identifier. Used as the key in the interaction payload.

label string · required

Placeholder text shown inside the input field.

title string

Optional label rendered above the input field.

submit boolean

When true, pressing Enter or the submit arrow submits the form immediately.

JSON
{
  "type": "input",
  "id": "input-action-search",
  "label": "Search...",
  "title": "Search items",
  "submit": true
}

Interaction: submitting the input posts { "input-action-search": "<entered value>" }.

textarea

Renders a multi-line text area. Follows the same interaction model as input.

type string · required

Must be "textarea".

id string · required

Unique identifier. Used as the key in the interaction payload.

label string · required

Placeholder text shown inside the textarea.

title string

Optional label rendered above the textarea.

submit boolean

When true, pressing Enter or the submit arrow submits the form immediately.

JSON
{
  "type": "textarea",
  "id": "create-item-description",
  "label": "Describe the issue...",
  "title": "Description"
}

Interaction: submitting the textarea posts { "create-item-description": "<entered value>" }.

dropdown

Renders a select dropdown populated with a list of options. When the admin picks an option, its id is posted back.

type string · required

Must be "dropdown".

id string · required

Unique identifier. Used as the key in the interaction payload.

title string · required

Label displayed above the dropdown.

options array · required

Array of option objects, each with:

  • id — value posted when this option is selected.
  • text — label displayed in the dropdown.
JSON
{
  "type": "dropdown",
  "id": "create-item-project",
  "title": "Project",
  "options": [
    { "id": "proj_abc", "text": "Project Alpha" },
    { "id": "proj_def", "text": "Project Beta" }
  ]
}

Interaction: selecting an option posts { "create-item-project": "proj_abc" }.

link

Renders a hyperlink, optionally with a label above it. No interaction is posted.

type string · required

Must be "link".

text string · required

The visible link text.

href string · required

The URL the link points to.

title string

Optional label rendered above the link.

JSON
{
  "type": "link",
  "title": "Linked with:",
  "text": "DevOps #42",
  "href": "https://devops.example.com/items/42"
}

No interaction — link components do not post values.

list

Renders a labeled list of items. Each item is either a selectable "option" or a "link". When the admin selects an option item, the item's id is posted under the list's id.

type string · required

Must be "list".

id string · required

Unique identifier for the list. Used as the key in the interaction payload.

title string · required

Heading displayed above the list.

items array · required

Array of item objects. Each item is one of:

  • { "type": "option", "id": <value>, "text": <string> } — a selectable row. When clicked, posts { [list.id]: <item.id> }. The id can be a nested object (for example { "item_id": 42, "project_id": "p1" }), and the whole object is posted back.
  • { "type": "link", "href": <string>, "text": <string> } — a row that opens a URL. No interaction is posted.
JSON
{
  "type": "list",
  "id": "link-item-list",
  "title": "Items",
  "items": [
    { "type": "option", "id": { "item_id": 42, "project_id": "p1" }, "text": "Item #42 - Task" },
    { "type": "option", "id": { "item_id": 43, "project_id": "p2" }, "text": "Item #43 - Bug" }
  ]
}

Interaction: selecting the first option posts { "link-item-list": { "item_id": 42, "project_id": "p1" } }.

Conditional visibility

Any component accepts an optional condition object. When present, Sleekplan shows the component only when the value of the field identified by condition.value matches the string in condition.key.

JSON
{
  "type": "dropdown",
  "id": "create-item-type",
  "title": "Item Type",
  "condition": { "value": "create-item-project", "key": "proj_abc" },
  "options": [
    { "id": "Task", "text": "Task" },
    { "id": "Bug", "text": "Bug" }
  ]
}

In the example above, the dropdown is only visible when the create-item-project field currently holds the value "proj_abc".

Inline errors

To display a section-level error, return the first element with an error key instead of a type key.

JSON
[{ "error": "Could not connect to DevOps. Check your credentials and try again." }]

Sleekplan renders the message inline at the top of the canvas panel.

End-to-end flow

The following sequence shows how a complete link-creation flow might look across three round trips.

Initial render

The view loads and your server returns a search input and a create button.

JSON
[
  { "type": "text", "text": "Search or create DevOps item", "style": "paragraph" },
  { "type": "input", "id": "input-action-search", "label": "Search...", "submit": true, "placeholder": "leave blank to skip" },
  { "type": "button", "id": "button-action-create", "label": "Create new item", "style": "blue", "action": { "type": "submit" } }
]

After search submitted

The admin typed a query and submitted. Your server returns a list of matching items alongside the create button.

JSON
[
  {
    "type": "list",
    "id": "link-item-list",
    "title": "Items",
    "items": [
      { "type": "option", "id": { "item_id": 42, "project_id": "p1" }, "text": "Item #42 - Task" },
      { "type": "option", "id": { "item_id": 43, "project_id": "p2" }, "text": "Item #43 - Bug" }
    ]
  },
  { "type": "button", "id": "button-action-create", "label": "Create new item", "style": "blue", "action": { "type": "submit" } }
]

The admin selected an item. Your server linked it and returns a confirmation with an unlink button.

JSON
[
  { "type": "link", "title": "Linked with:", "text": "DevOps #42", "href": "https://devops.example.com/items/42" },
  { "type": "button", "id": "button-action-unlink", "label": "Unlink item", "style": "blue", "action": { "type": "submit" } }
]