Sign up (with export icon)

Dialog mode

Show the table of contents

To open CKBox in dialog mode, set the dialog configuration option to true. For more verbose configuration this option allows also for passing an object, which allows for more control over the opened dialog window. For details, please refer to the dialog option description.

CKBox.mount(document.querySelector('#ckbox'), {
    tokenUrl: 'https://your.token.url',
    dialog: true,
    assets: {
        // Callback executed after choosing assets
        onChoose: (assets) => {
            assets.forEach((asset) => {
                console.log(asset.data.url);
            })
        }
    }
});
Copy code

Click on the button below to open CKBox in dialog mode.

Note

Need more functionality? Take a survey and help us develop CKBox to suit your needs better!