Skip to content

← All components

Foundation and layout

AppShell

Full-height application shell with a sticky-footer main region.

Live example

Header

Main content grows

Sticky footer

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

tsx
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

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

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.

ParameterTypeDefaultAdaptersExampleDescription
childrenReactNode | Svelte Snippet | child HTMLReact · Svelte · HTMLchildren / snippet / child HTMLIdiomatic adapter composition content.
div attributesnative element attributesReact · Svelte · HTMLclass / style / aria-* / data-*Forwards native class/style, accessibility, event, and data attributes to the root element.