All blocks
[07] Marketing
Bento Feature Grid
Tiles of two widths, each showing its feature with live components instead of a picture.
1280px
Copy the code
One file with one component and its sample data. It needs @vaneui/ui and its stylesheet, set up as in the installation guide.
features-bento.tsx
import type { ReactNode } from "react";import { Alert, Avatar, AvatarGroup, Badge, Button, Card, Col, Container, Grid3, Input, Kbd, Progress, Row, Section, SectionTitle, SegmentedControl, SegmentedControlItem, Table, Tbody, Td, Text, Title, Tr } from "@vaneui/ui";
const team = ["Ana Diaz", "Lee Park", "Sam Ortiz", "Mia Chen", "Noah Kim"];const orders = [ { id: "#1042", who: "Ana Diaz", status: "Paid", total: "$120.00" }, { id: "#1041", who: "Lee Park", status: "Pending", total: "$48.50" },];
function Mail() { return ( <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"> <rect x="3" y="5" width="18" height="14" rx="2" /><path d="m3 7 9 6 9-6" /> </svg> );}
// A wide tile spans two of the three columns; the last tile spans the row in the two-column layoutconst wide = "col-span-2 max-mobile:col-span-1";const lastOnTablet = "max-tablet:col-span-2 max-mobile:col-span-1";
/** One feature: a live demo made of real components on top, the title and one line under it */function Tile({ title, text, span, children }: { title: string; text: string; span?: string; children: ReactNode }) { return ( <Card justifyBetween className={span}> <Col flex1 justifyCenter inert aria-hidden="true">{children}</Col> <Col xs> <Title>{title}</Title> <Text secondary>{text}</Text> </Col> </Card> );}
export function FeaturesBento() { return ( <Section> <Container itemsStretch> <Col xl> <Col className="max-w-2xl"> <SectionTitle className="text-balance">One workspace for planning, tracking and shipping</SectionTitle> <Text lg secondary>Each tile shows the feature with the same components you build with.</Text> </Col> <Grid3> <Tile span={wide} title="Invite the whole team" text="Send invites by email and see who has joined."> <Row mobileStack itemsStretch> <Input startSection={<Mail />} placeholder="name@company.com" /> <Button filled noShrink mobileWFull>Send invite</Button> </Row> <AvatarGroup max={4} total={9}> {team.map((n) => <Avatar key={n} name={n} />)} </AvatarGroup> </Tile> <Tile title="Light and dark" text="Every screen follows the theme."> <SegmentedControl aria-label="Theme" defaultValue="dark"> <SegmentedControlItem value="light">Light</SegmentedControlItem> <SegmentedControlItem value="dark">Dark</SegmentedControlItem> <SegmentedControlItem value="system">System</SegmentedControlItem> </SegmentedControl> </Tile> <Tile title="Status at a glance" text="Badges and bars you read in one look."> <Row sm flexWrap> <Badge success dot>Live</Badge> <Badge warning dot>Review</Badge> <Badge danger dot>Blocked</Badge> </Row> <Progress value={68} aria-label="Sprint progress" /> </Tile> <Tile title="Keyboard first" text="Search anything from anywhere."> <Input placeholder="Search projects, people, docs" endSection={<Kbd>⌘K</Kbd>} /> </Tile> <Tile title="Clear feedback" text="Messages that say what happened."> <Alert success>Invoice sent to Northwind</Alert> </Tile> <Tile span={wide} title="Every order in one table" text="Sort, filter and export without leaving the page."> <Card noPadding overflowXAuto> <Table> <Tbody> {orders.map((o) => ( <Tr key={o.id}> <Td>{o.id}</Td> <Td>{o.who}</Td> <Td><Badge success={o.status === "Paid"} warning={o.status === "Pending"}>{o.status}</Badge></Td> <Td textRight className="tabular-nums">{o.total}</Td> </Tr> ))} </Tbody> </Table> </Card> </Tile> <Tile span={lastOnTablet} title="Loading states built in" text="One prop turns a layout into its placeholder."> <Row skeleton> <Avatar name="Ana Diaz" /> <Col noGap> <Text>Ana Diaz</Text> <Text sm>Product designer</Text> </Col> </Row> </Tile> </Grid3> </Col> </Container> </Section> );}Components in this block
Adapt it with your coding agent
Add the VaneUI MCP server, and your agent reads the component docs and prop tables while it changes the block: the copy, the sample data or the layout.
$ claude mcp add vaneui -- npx -y @vaneui/mcp
Setup for other editors is in the AI assistants guide.