# defineCanvasInstance

> API reference for defineCanvasInstance: parameters, properties, and return types.

Defines a canvas with components, actions, and variables.

```ts
import { defineCanvasInstance } from '@rippling/rippling-sdk';
```

## Properties

| Property | Required | Type | Description |
| --- | --- | --- | --- |
| `apiName` | Required | `` `${string}__c` `` | — |
| `components` | Required | `[CanvasComponent](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/CanvasComponent-1cfc1053)[]` | — |
| `name` | Required | `null \| string` | — |
| `actions` | Optional | `null \| [CanvasAction](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/CanvasAction-56b56e88)[]` | — |
| `canvasActions` | Optional | `null \| [CanvasAction](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/CanvasAction-56b56e88)[]` | — |
| `functions` | Optional | `readonly [DefinedFunction](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefinedFunction-a7c0455d)<any, any>[]` | Function definitions referenced by actions, included in the manifest. |
| `media` | Optional | `null \| Record<string, [CanvasMedia](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/CanvasMedia-c3bf42d1)>` | — |
| `sourceId` | Optional | `null \| string` | Source ID from an extracted config; never used as the Canvas identity. |
| `variables` | Optional | `null \| [CanvasVariable](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/CanvasVariable-aef04d5c)[]` | — |
| `version` | Optional | `null \| [CanvasVersion](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/CanvasVersion-cd3c0a1f)` | — |

[Complete options type](https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/types/DefineCanvasInstanceProps-28081a64)

TypeScript signature

```ts
defineCanvasInstance(props: DefineCanvasInstanceProps): DefinedCanvasInstance;
```

## Returns

```
DefinedCanvasInstance
```

## Availability

| Capability | Support |
| --- | --- |
| Pull into a project | Supported |
| Runtime operations | Not available for this helper |

Source: https://developer.rippling.com/documentation/js-sdk/metadata-sdk/reference/defineCanvasInstance

> For the complete documentation index, see [llms.txt](https://developer.rippling.com/llms.txt). Public pages have a Markdown version at the same URL with .md added.
