Page Shells
Typical layout shells of dashboards in which components can be easily inserted.
Page Shell with 3-Column KPI section + Tabs
Dashboard
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
import { Card, Title, Text, Tab, TabList, Grid } from "@tremor/react"; import { useState } from "react"; export default function Example() { const [selectedView, setSelectedView] = useState("1"); return ( <main> <Title>Dashboard</Title> <Text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</Text> <TabList defaultValue="1" onValueChange={(value) => setSelectedView(value)} className="mt-6" > <Tab value="1" text="Page 1" /> <Tab value="2" text="Page 2" /> </TabList> {selectedView === "1" ? ( <> <Grid numColsMd={2} numColsLg={3} className="gap-6 mt-6"> <Card> {/* Placeholder to set height */} <div className="h-28" /> </Card> <Card> {/* Placeholder to set height */} <div className="h-28" /> </Card> <Card> {/* Placeholder to set height */} <div className="h-28" /> </Card> </Grid> <div className="mt-6"> <Card> <div className="h-80" /> </Card> </div> </> ) : ( <div className="mt-6"> <Card> <div className="h-96" /> </Card> </div> )} </main> ); }
Page Shell with big Container + 2-Column bottom KPI Section
Dashboard
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
import { Card, Title, Text, Grid } from "@tremor/react"; export default function Example() { return ( <main> <Title>Dashboard</Title> <Text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</Text> {/* Main section */} <Card className="mt-6"> <div className="h-96" /> </Card> {/* KPI section */} <Grid numColsMd={2} className="mt-6 gap-6"> <Card> {/* Placeholder to set height */} <div className="h-28" /> </Card> <Card> {/* Placeholder to set height */} <div className="h-28" /> </Card> </Grid> </main> ); }
Page Shell with KPI Sidebar
Dashboard
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
import { Card, Title, Text, Grid, Col } from "@tremor/react"; export default function Example() { return ( <main> <Title>Dashboard</Title> <Text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</Text> <Grid numColsLg={6} className="gap-6 mt-6"> {/* Main section */} <Col numColSpanLg={4}> <Card className="h-full"> <div className="h-60" /> </Card> </Col> {/* KPI sidebar */} <Col numColSpanLg={2}> <div className="space-y-6"> <Card> <div className="h-24" /> </Card> <Card> <div className="h-24" /> </Card> <Card> <div className="h-24" /> </Card> </div> </Col> </Grid> </main> ); }
Page Shell with KPI Grid
Dashboard
Lorem ipsum dolor sit amet, consetetur sadipscing elitr.
import { Card, Title, Text, Grid } from "@tremor/react"; export default function Example() { return ( <main> <Title>Dashboard</Title> <Text>Lorem ipsum dolor sit amet, consetetur sadipscing elitr.</Text> <Grid numColsMd={2} className="mt-6 gap-6"> <Card> <div className="h-44" /> </Card> <Card> <div className="h-44" /> </Card> <Card> <div className="h-44" /> </Card> <Card> <div className="h-44" /> </Card> <Card> <div className="h-44" /> </Card> <Card> <div className="h-44" /> </Card> </Grid> </main> ); }