Foundation and layout
AppShell
Full-height application shell with a sticky-footer main region.
Live example
Header
Main content grows
Header
Main content grows
Header
Main content grows
Usage
Each example includes the complete adapter-specific parameter reference. Copy it as a starting point, then remove options your use case does not need.
React
import { AppShell } from "@cofob/design-system-react";
/**
* Complete AppShell parameter reference.
* @param children
* type: ReactNode | Svelte Snippet | child HTML
* default: —
* example: children / snippet / child HTML
* @param div attributes
* type: native element attributes
* default: —
* example: class / style / aria-* / data-*
*/
export function AppShellExample() {
return (
<AppShell><Header /><main>Content</main><Footer /></AppShell>
);
}Svelte
<script lang="ts">
import { AppShell } from "@cofob/design-system-svelte";
// Complete AppShell parameter reference.
// children
// type: ReactNode | Svelte Snippet | child HTML
// default: —
// example: children / snippet / child HTML
// div attributes
// type: native element attributes
// default: —
// example: class / style / aria-* / data-*
</script>
<AppShell><Header /><main>Content</main><Footer /></AppShell>HTML
<!--
Complete AppShell parameter reference.
children
type: ReactNode | Svelte Snippet | child HTML
default: —
example: children / snippet / child HTML
div attributes
type: native element attributes
default: —
example: class / style / aria-* / data-*
-->
<div class="cf-app-shell"><header>…</header><main>…</main><footer>…</footer></div>Parameters
Adapter differences are explicit. Native element attributes are forwarded in React and Svelte and can be written directly in HTML.
| Parameter | Type | Default | Adapters | Example | Description |
|---|---|---|---|---|---|
children | ReactNode | Svelte Snippet | child HTML | — | React · Svelte · HTML | children / snippet / child HTML | Idiomatic adapter composition content. |
div attributes | native element attributes | — | React · Svelte · HTML | class / style / aria-* / data-* | Forwards native class/style, accessibility, event, and data attributes to the root element. |