Aller au contenu

Svelte

Ce contenu n’est pas encore disponible dans votre langue.

Use @subnoto/embed-svelte to render the signing UI in a Svelte app. Pass the iframe token and optional host; the component builds the embed URL.

install.sh
pnpm add @subnoto/embed-svelte
# or npm install @subnoto/embed-svelte

Create the iframe token on your backend and pass it to the client. See Iframe token for the API.

SigningView.svelte
<script lang="ts">
import { SignEmbed } from "@subnoto/embed-svelte";
export let iframeToken: string;
export let host: string | undefined = undefined;
</script>
<div class="embed-container">
<SignEmbed {iframeToken} {host} title="Subnoto signing" />
</div>
<style>
.embed-container {
width: 100%;
height: 400px;
}
</style>

Pass iframeToken (required) and optionally host (default https://app.subnoto.com). Use a sized container so the iframe fills the space.