AuthFrame
A centered brand and panel, compact or reading width.
AuthFrame has no application navigation. Preview the compact panel or the wider reading layout.
Source
<script lang="ts">
import 'portal-bits/styles.css';
import 'portal-bits/tokens.css';
import type { Snippet } from 'svelte';
let { children }: { children: Snippet } = $props();
</script>
{@render children()}
<script lang="ts">
import AuthFrameExample from './AuthFrameExample.svelte';
</script>
<AuthFrameExample />
<script lang="ts">
import { AuthFrame, Button, Input, SectionHeader } from 'portal-bits';
let title = $state('');
</script>
<!-- size="reading" selects the wider layout for documents. -->
<AuthFrame size="compact" brandHref="#home">
{#snippet brand()}<span>Example Studio</span>{/snippet}
<SectionHeader title="Create a draft" description="Synthetic form. Nothing is sent or stored." />
<form onsubmit={(event) => event.preventDefault()}>
<Input label="Draft title" bind:value={title} required name="title" />
<Button variant="green" type="submit">Save draft</Button>
</form>
</AuthFrame>
API reference
These tables list the props and snippets that AuthFrame declares. Attributes passed through to an element or primitive are listed under Forwarded attributes, not here.
Props
| Name | Type | Default | Required | Binding | Description |
|---|---|---|---|---|---|
size | 'compact' | 'reading' | compact | No | One-way | Panel width: 28rem or 40rem at most. |
brandHref | string | None | Yes | One-way | The destination of the brand link. |
class | string | "" | No | One-way | Extra classes, added after the component classes. |
Snippets
| Name | Type | Default | Required | Binding | Description |
|---|---|---|---|---|---|
brand | Snippet | None | Yes | One-way | The mark and name inside the brand link. |
children | Snippet | None | Yes | One-way | The panel content, such as a form. |
Forwarded attributes
- Native `div` attributes: `id`, `aria-*`, `data-*`, and handlers. They land on the outer frame.
No data attributes are documented as stable.
Limits
- No top bar, skip link, footer, or `main` landmark. You own the content semantics and form structure.
- Both sizes are adaptations. The gallery previews them on their own pages.