> ## Documentation Index
> Fetch the complete documentation index at: https://docs.inklyai.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Widgets

> Headline, form, embed, custom, and image widgets for cover steps.

Widgets define what appears inside a cover step. They let a cover act like an intro page, a lead form, an embedded page, or a custom screen.

Choose the widget based on the job of the cover: explain, collect, embed, or extend.

## Headline

Headline widgets are best for intro, transition, and closing screens. They show copy, optional media, and one or two calls to action.

| Field              | Type                                | Required | Default | Notes                                                                                          |
| ------------------ | ----------------------------------- | -------- | ------- | ---------------------------------------------------------------------------------------------- |
| `type`             | `"headline"`                        | Yes      | —       | Discriminator.                                                                                 |
| `id`               | `string`                            | Yes      | —       | Widget id.                                                                                     |
| `title`            | `string`                            | Yes      | —       | Headline copy. Inline markdown.                                                                |
| `titleColor`       | `string`                            | No       | —       | CSS color for the title.                                                                       |
| `description`      | `string`                            | No       | —       | Subtitle copy. Inline markdown.                                                                |
| `descriptionColor` | `string`                            | No       | —       | CSS color for the description.                                                                 |
| `logo`             | `object`                            | No       | —       | Brand logo above the title. `{ src, alt?, height? }`.                                          |
| `image`            | `object`                            | No       | —       | Positioned image beside or above the copy. See [Widget image](#widget-image).                  |
| `textAlign`        | `"left"` \| `"middle"` \| `"right"` | No       | —       | Copy and CTA alignment.                                                                        |
| `cta`              | `object`                            | No       | —       | Primary call-to-action. See [Navigation and actions](/schema/demo/navigation-and-actions#cta). |
| `secondaryCta`     | `object`                            | No       | —       | Second CTA rendered after `cta`. Same shape.                                                   |

## Form

Form widgets collect information from viewers before, during, or after a demo.

| Field         | Type       | Required | Default                                               | Notes                                                       |
| ------------- | ---------- | -------- | ----------------------------------------------------- | ----------------------------------------------------------- |
| `type`        | `"form"`   | Yes      | —                                                     | Discriminator.                                              |
| `id`          | `string`   | Yes      | —                                                     | Widget id.                                                  |
| `logo`        | `object`   | No       | —                                                     | Brand logo above the copy. Same shape as the headline logo. |
| `image`       | `object`   | No       | —                                                     | Positioned image. See [Widget image](#widget-image).        |
| `title`       | `string`   | No       | —                                                     | Copy above the fields.                                      |
| `description` | `string`   | No       | —                                                     | Copy above the fields.                                      |
| `fields`      | `object[]` | Yes      | —                                                     | At least one field. See [Form fields](#form-fields).        |
| `submit`      | `object`   | No       | `{ "label": "Submit", "action": { "type": "next" } }` | Submit button. Uses the same CTA shape.                     |

### Form fields

| Field         | Type                     | Required    | Default  | Notes                                                         |
| ------------- | ------------------------ | ----------- | -------- | ------------------------------------------------------------- |
| `id`          | `string`                 | Yes         | —        | Field id.                                                     |
| `label`       | `string`                 | Yes         | —        | Field label.                                                  |
| `type`        | `"text"` \| `"dropdown"` | No          | `"text"` | Field shape.                                                  |
| `placeholder` | `string`                 | No          | —        | Placeholder text.                                             |
| `required`    | `boolean`                | No          | `false`  | Whether the field is required.                                |
| `options`     | `object[]`               | Conditional | —        | `{ value, label }` choices. Required when `type: "dropdown"`. |

## Embed

Embed widgets place another web page or tool inside the cover screen.

| Field         | Type      | Required | Default                                                                                                      | Notes                                       |
| ------------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------- |
| `type`        | `"embed"` | Yes      | —                                                                                                            | Discriminator.                              |
| `id`          | `string`  | Yes      | —                                                                                                            | Widget id.                                  |
| `src`         | `string`  | Yes      | —                                                                                                            | Embed URL. May be empty while authoring.    |
| `iframeTitle` | `string`  | No       | —                                                                                                            | Iframe `title` attribute for accessibility. |
| `sandbox`     | `string`  | No       | `allow-scripts allow-same-origin allow-forms allow-popups allow-popups-to-escape-sandbox allow-presentation` | Space-separated `sandbox` flags.            |
| `allow`       | `string`  | No       | `camera; microphone; fullscreen; payment; clipboard-write`                                                   | Iframe `allow` feature policy.              |

## Custom

Custom widgets are for teams that render their own cover experience with custom code.

| Field  | Type       | Required | Default | Notes                                              |
| ------ | ---------- | -------- | ------- | -------------------------------------------------- |
| `type` | `"custom"` | Yes      | —       | Discriminator.                                     |
| `id`   | `string`   | Yes      | —       | Widget id.                                         |
| `name` | `string`   | Yes      | —       | Selects the registered custom renderer. Non-empty. |
| `data` | `object`   | No       | —       | Opaque prop bag passed through.                    |

## Widget image

The optional image on `headline` and `form` widgets.

| Field           | Type                             | Required | Default   | Notes                                                                      |
| --------------- | -------------------------------- | -------- | --------- | -------------------------------------------------------------------------- |
| `src`           | `string`                         | Yes      | —         | Asset reference (`asset:<id>`), in-repo path, or raw `https:`/`data:` URL. |
| `alt`           | `string`                         | No       | —         | Alt text.                                                                  |
| `naturalWidth`  | `number`                         | No       | —         | Intrinsic width in px. Positive.                                           |
| `naturalHeight` | `number`                         | No       | —         | Intrinsic height in px. Positive.                                          |
| `position`      | `"left"` \| `"right"` \| `"top"` | No       | `"right"` | Placement relative to the copy.                                            |
| `layout`        | `"standard"` \| `"hero"`         | No       | `"hero"`  | `hero` renders full-bleed; `standard` is a contained, rounded card.        |
