On September 25th, 2024, we released v2 of the Apps SDK. To learn what’s new and how to upgrade, see Migration FAQ and Migration guide.

DraggableEmbed

API reference for the DraggableEmbed component.

The DraggableEmbed component has been deprecated. Instead, use the EmbedCard component.

Usage

import React from "react";
import { DraggableEmbed } from "components/draggable_embed";
export function App() {
return (
<DraggableEmbed
embedUrl="https://www.youtube.com/embed/L3MtFGWRXAA"
previewUrl="https://www.canva.dev/example-assets/images/puppyhood.jpg"
previewSize={{ width: 320, height: 180 }}
title="Heartwarming Chatter: Adorable Conversation with a Puppy"
subtitle="Puppyhood"
/>
);
}
TSX

Props

embedUrlstring
REQUIRED

The URL of the embeddable media.

This URL must be supported by Iframely. To learn more, see What URLs to send to Iframely(opens in a new tab or window).

previewUrlstring
REQUIRED

The URL of a thumbnail image.

previewSizestring
REQUIRED

The dimensions of the preview image, in pixels.

titlestring
REQUIRED

A human-readable title for the embed.

subtitlestring
OPTIONAL

A human-readable subtitle for the embed.