> ## Documentation Index > Fetch the complete documentation index at: https://www.canva.dev/docs/button/llms.txt > Use this file to discover all available pages before exploring further. # onDesignOpen API reference for the JavaScript API's onDesignOpen method. A function that runs when a user opens a design. This includes when a user creates a new design or edits an existing design. ## Usage ```javascript api.createDesign({ design: { type: "Poster", }, onDesignOpen: (opts) => { console.log(opts); }, }); ``` **Tip:** You can pass the `onDesignOpen` function into the [`createDesign`](https://www.canva.dev/docs/button/javascript/api-reference/create-design/) and [`editDesign`](https://www.canva.dev/docs/button/javascript/api-reference/edit-design/) functions. ## Parameters | Name | Type | Required | Description | | :----------------- | :----- | :------: | :---------------------------------------------- | | `opts` | object | Yes | Parameters that Canva passes into the function. | | `opts.designId` | string | Yes | The ID of the user's design. | | `opts.designTitle` | string | Yes | The title of the user's design. | ## Returns `void`