Templates
A template is a Svelte 5 component whose markup is a <Document>:
<script lang="ts">
import { Document, Page, Text } from '@inkoxide/svelte';
let { customer }: { customer: string } = $props();
</script>
<Document title="Receipt">
<Page size="A6" class="p-8">
<Text class="text-lg font-bold">Receipt for {customer}</Text>
</Page>
</Document>
Props, {#if}, {#each}, snippets, contexts and components of your own work. The white space of
the markup is read as JSX reads it, so a document gives the same tree, and the same PDF, in every
front end.
Synced from packages/svelte/GUIDE.md in the inkoxide repository.