Components
Full Screen Layout
A viewport-height layout with optional header, footer and centering.
Installation
$ npx veil-ui@latest add full-screen-layoutUsage
import { FullScreenLayout } from "@/components/ui/full-screen-layout";
<FullScreenLayout centered>
<LoginCard />
</FullScreenLayout>;Examples
Centered
Sign in
Use the centered variant for auth screens.
Application frame
Workspace
Main area fills the remaining height.
Padded
Padding is applied to the main region.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| header | React.ReactNode | — | Optional top bar. |
| footer | React.ReactNode | — | Optional bottom bar. |
| centered | boolean | false | Center the main content on both axes. |
| padded | boolean | false | Apply responsive padding to the main region. |
| ...props | React.ComponentProps<"div"> | — | All native div attributes. |
Accessibility
- The main region is a
mainlandmark. - Centering is visual only; keep the DOM order logical.
- Avoid trapping scroll inside the layout; it grows with its content.
Vue and plain HTML
This component also ships for Vue (Reka UI) and plain HTML. Install it with npx veil-ui add full-screen-layout --framework vue or switch the framework in components.json.
<script setup lang="ts">
import { cn } from "@/lib/utils";
const props = withDefaults(
defineProps<{
centered?: boolean;
padded?: boolean;
class?: string;
}>(),
{
centered: false,
padded: false,
},
);
</script>
<template>
<div
data-slot="full-screen-layout"
:class="cn('flex min-h-dvh flex-col bg-background', props.class)"
>
<header
v-if="$slots.header"
data-slot="full-screen-layout-header"
class="border-b"
>
<div class="px-4 py-3 sm:px-6">
<slot name="header" />
</div>
</header>
<main
data-slot="full-screen-layout-main"
:class="
cn(
'flex flex-1 flex-col',
props.centered && 'items-center justify-center',
props.padded && 'p-4 sm:p-6',
)
"
>
<slot />
</main>
<footer
v-if="$slots.footer"
data-slot="full-screen-layout-footer"
class="border-t"
>
<div class="px-4 py-3 sm:px-6">
<slot name="footer" />
</div>
</footer>
</div>
</template>