Skip to content
Components

Launcher grid

Lay out a page in two columns, or arrange a home screen of app tiles.

TS
import { โ€ฆ } from "@fungi.computer/caps/blocks/launcher-grid";

App grid

TSX
import { AppGrid } from "@fungi.computer/caps/blocks/launcher-grid";
const items = [
{
id: "forage",
label: "Forage",
icon: <span>๐Ÿ„</span>,
onSelect: () => {
/* This specimen has no host action. */
},
},
{
id: "dry",
label: "Dry",
icon: <span>๐ŸŒฌ๏ธ</span>,
onSelect: () => {
/* This specimen has no host action. */
},
},
{
id: "market",
label: "Market",
icon: <span>๐Ÿ›’</span>,
onSelect: () => {
/* This specimen has no host action. */
},
},
{
id: "lab",
label: "Lab",
icon: <span>๐Ÿงช</span>,
onSelect: () => {
/* This specimen has no host action. */
},
},
];
export default function AppGridHero() {
return <AppGrid items={items} />;
}

App grid states

TSX
import { AppGrid } from "@fungi.computer/caps/blocks/launcher-grid";
const items = [
{
id: "forage",
label: "Forage",
icon: <span>๐Ÿ„</span>,
onSelect: () => {
/* This specimen has no host action. */
},
status: <span className="text-xs text-success">Active</span>,
},
{
id: "compost",
label: "Compost",
icon: <span>๐Ÿชด</span>,
onSelect: () => {
/* This specimen has no host action. */
},
muted: true,
},
{
id: "market",
label: "Market",
icon: <span>๐Ÿ›’</span>,
onSelect: () => {
/* This specimen has no host action. */
},
disabled: true,
},
];
export default function AppGridStates() {
return <AppGrid size="lg" items={items} />;
}

Section grid

TSX
import { SectionGrid } from "@fungi.computer/caps/blocks/launcher-grid";
import { SectionCard } from "@fungi.computer/caps/blocks/section-card";
export default function SectionGridHero() {
return (
<SectionGrid className="w-full max-w-md">
<SectionCard heading="Today's pick">3.2 kg logged.</SectionCard>
<SectionCard heading="Drying now">2 batches.</SectionCard>
</SectionGrid>
);
}

Props

SectionGridProps

PropTypeDescription
layout?"split" | "desktop"split is a page's two-column section grid. desktop composes a home screen: it fills and scrolls its region, centers a bounded measure, and lets span="full" sections run across both columns.
  • layout?"split" | "desktop"

    split is a page's two-column section grid. desktop composes a home screen: it fills and scrolls its region, centers a bounded measure, and lets span="full" sections run across both columns.

AppGridProps

PropTypeDescription
itemsreadonly AppGridItem[]
size?"default" | "lg"default is a quiet launcher. lg gives each mark a larger key and a more spacious label. The theme supplies its material.
  • itemsreadonly AppGridItem[]
  • size?"default" | "lg"

    default is a quiet launcher. lg gives each mark a larger key and a more spacious label. The theme supplies its material.

Full types: API reference.