Skip to content
CodeAtlas UI

Layout

PageShell

The standard page container with a title, a description and an actions slot.

<script>
  import { PageShell, Button } from "@codeatlasdev/ui";
</script>

<PageShell title="Dashboard" description="Overview of this month">
  {#snippet actions()}<Button size="sm">New report</Button>{/snippet}
  <!-- page content -->
</PageShell>

Dashboard page

KPI cards and a content card inside a PageShell.

Dashboard

Overview of this month

Revenue

$118k
↑+23.4%

Users

24.8k
↑+8.1%

Growth

34%
↑+5.6%

Uptime

99.9%
↑+0.1%

Chart or data table goes here

Code
svelte
<script lang="ts">
  import { PageShell, KpiCard, GlassCard, Grid, Stack, Button } from '@codeatlasdev/ui';
  import { TrendingUp, Users, DollarSign, Activity } from '@lucide/svelte';
</script>

<GlassCard flush full>
  <PageShell title="Dashboard" description="Overview of this month">
    {#snippet actions()}<Button variant="filled" size="sm">New report</Button>{/snippet}

    <Stack gap={24}>
      <Grid cols="repeat(auto-fill,minmax(180px,1fr))" gap={12}>
        <KpiCard title="Revenue" value="$118k" trend={23.4} icon={DollarSign} />
        <KpiCard title="Users" value="24.8k" trend={8.1} icon={Users} />
        <KpiCard title="Growth" value="34%" trend={5.6} icon={TrendingUp} />
        <KpiCard title="Uptime" value="99.9%" trend={0.1} icon={Activity} />
      </Grid>

      <GlassCard full>
        <p class="placeholder">Chart or data table goes here</p>
      </GlassCard>
    </Stack>
  </PageShell>
</GlassCard>

<style>
  .placeholder {
    margin: 0;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ca-text-hint);
    font-size: var(--ca-font-size-body2);
  }
</style>

Props

PropTypeDefaultDescription
titlestring–Page title.
descriptionstring–Supporting text under the title.
gapnumber28Vertical gap between the header and the content, in px.
maxWidthstring'1280px'Maximum width of the content column.
actionsSnippet–Right side of the page header.
childrenSnippet–Page content.
classstring''Extra class names.