···11+<script module lang="ts">
22+ import { tv } from "tailwind-variants";
33+44+ // the surface that docks directly beneath a <Tabs> bar. it pulls itself up 1px
55+ // so its top border tucks behind the bar, where the active tab's raised, opaque
66+ // background hides the seam — producing the connected "folder tab" look. keep it
77+ // flush against the tab bar (no margin between them) for the join to line up.
88+ export const tabPanel = tv({
99+ base: "-mt-px rounded border border-border-default bg-background-default text-foreground-default",
1010+ variants: {
1111+ // the common surface padding; turn off to lay out children yourself
1212+ padded: {
1313+ true: "px-6 py-4",
1414+ false: ""
1515+ }
1616+ },
1717+ defaultVariants: {
1818+ padded: true
1919+ }
2020+ });
2121+</script>
2222+2323+<script lang="ts">
2424+ import type { Snippet } from "svelte";
2525+2626+ interface Props {
2727+ // tag to render as; a semantic <section> by default
2828+ as?: string;
2929+ padded?: boolean;
3030+ class?: string;
3131+ children: Snippet;
3232+ }
3333+3434+ let { as = "section", padded = true, class: className, children }: Props = $props();
3535+</script>
3636+3737+<svelte:element this={as} class={tabPanel({ padded, class: className })}>
3838+ {@render children()}
3939+</svelte:element>