Documentation

Storefront components

Everything you can place in your MDX pages. Commerce components render live against your catalog; layout and content components keep pages consistent — all sandboxed by the platform.

Commerce

Data-wired components that render live against your catalog — place them in MDX, the platform supplies the data.

<ProductGrid />

Responsive product listing with optional category, query, and limit. Refines automatically from FacetFilter URL state. Props: category, query, limit, columns (1 to 4, default 4).

<ProductGrid category="hvac" limit="8" />

<ProductList />

The same products as ProductGrid as compact rows: thumbnail, name, brand, SKU and short description.

<ProductList limit="4" />

<ProductCard />

One product, resolved by SKU, slug, or id — ideal for merchandising callouts. Props: sku, slug or id (which product), and to replace what the catalog holds: name, brand, description, image, href, price, currency, inventoryStatus.

<ProductCard sku="HVC-2041" />

<ProductDetail />

Full product page with specs and attributes. Reads the slug from the URL or a prop. Props: slug, quoteNote (the line above the quote button), quoteLabel (the quote button's words).

<ProductDetail />

<SearchResults />

Catalog search form plus results, driven by the ?q= parameter. ProductSearch is an alias. Props: placeholder.

<SearchResults />

<FacetFilter />

Filter controls that refine ProductGrid through URL state. Props: filters, a list written in braces: {[{label: "Voltage", code: "voltage", options: ["120V", "240V"]}]}.

<CategoryNav />

Navigation across your catalog taxonomy. Props: showCounts (written bare, shows how many products each holds).

<Price />

Locale-aware price formatting using your store currency. Props: amount, currency (a three-letter code), compareAt (an earlier price, shown struck through when it is higher).

<Price amount="129.99" />

<InventoryBadge />

Stock status indicator for lists and detail pages. Props: status (in_stock, low_stock, backorder, preorder, out_of_stock).

<AddToQuote />

Quote-request entry point for B2B buying flows. A button that links: with sku (and unit, qty) to the search for that product, or to href. Props: label, href, sku, unit, qty.

<QuickOrder />

Order by part number: rows with type-ahead, pasted lines or a CSV, matched by SKU, manufacturer part number or UPC and added to the cart together. Shown to signed-in buyers; visitors are asked to sign in. Every store also has it at /quick-order. Props: title, rows (how many empty rows to start with, 1 to 20, default 5).

<QuickOrder title="Order by part number" />

Home page sections

Full-width blocks a home page is composed from. Each reads your catalog and theme, and leaves no gap when there is nothing to show yet.

<Hero />

The opening block and the page's main heading; use one per page, first. Props: title, subtitle, eyebrow (small line above the title), primaryLabel, primaryHref, secondaryLabel, secondaryHref, image, imageAlt, checklist (up to four short points with check icons, written in one prop with " | " between them), layout, align, overlay. Three looks. layout="center" is words alone, centered, on a soft wash of the primary color: a calm opening for a store with no photograph. layout="split" (the default) puts the words beside a picture; without an image it shows the store's own product pictures in its theme colors. layout="photo" is a band the full width of the window with the image behind the words, for a store with a real photograph (a warehouse, a counter, people at work): the words sit on a shade of the primary color (overlay="brand", the default) or near-black (overlay="dark") so they read on any photo, on the left (align="left", the default) or centered (align="center"). Choose "photo" to match a designed distributor site; keep "split" when there is no photograph.

<Hero layout="photo" image="/hero.jpg" imageAlt="Technician checking a rooftop unit" eyebrow="Industrial & building supply" title="Your one-stop supply partner" subtitle="HVAC, plumbing and electrical products for contractors and facility teams." checklist="Broad selection and top brands | Account pricing | Easy reordering" primaryLabel="Shop products" primaryHref="/product" secondaryLabel="Open an account" secondaryHref="/account/sign-in" />

<PromoCarousel />

A carousel of promotional pictures (a sale, a seasonal event, a new product line), the kind a distributor's marketing team makes as banners. Holds PromoSlide children, up to 8. PromoSlide props: image (required), alt (required in practice: say what the picture says, including any words drawn in it, since that is all a screen reader gets), href (where the slide links), mobileImage (a narrower picture shown on phones, where a wide banner's words get too small). PromoCarousel props: ratio ("wide" 3:1, the default; "banner" 4:1; "standard" 16:9; phones always get 16:9), interval (seconds per slide; left out, slides change only when the visitor presses a button), label (its name for screen readers, default "Promotions"). It has previous, next, one dot per slide and, when it plays, a pause button; it does not play for visitors who asked for reduced motion; without JavaScript the first slide shows and the rest are a swipe away. Use it only when the store has real promotional pictures: upload them with upload_image first. For a single message use Hero; for words without artwork use PromoTiles.

<PromoCarousel interval="6">
  <PromoSlide image="/promos/winter-event.jpg" alt="Winter stock-up event: save on igniters, flame sensors and motors through December 31" href="/product?category=parts" />
  <PromoSlide image="/promos/new-line.jpg" alt="Now stocking the full line of R-32 equipment" href="/product?category=equipment" />
</PromoCarousel>

<PromoTiles />

A row of wide tiles, each a heading, a sentence and a link: "Promotions", "R-32 transition", "Clearance". Usually two or three, right under the hero or carousel. Holds PromoTile children, up to 6. PromoTile props: title (required), text, href, label (the link's words, default "Learn more"), image (shown at the tile's end), tone (the panel color: "tint" a soft tint of the primary, the default; "primary"; "accent"; "plain" a white card). PromoTiles props: title (an optional heading above the row). Text on a colored panel is given a readable color automatically.

<PromoTiles>
  <PromoTile tone="primary" title="Promotions" text="Deals and savings for account holders." href="/promotions" label="See deals" />
  <PromoTile title="R-32 transition" text="What changes, and what we stock." href="/r32" image="/promos/r32.jpg" />
</PromoTiles>

<ActionCards />

A grid of things a customer can do, each a card with a picture or an icon, a heading, a sentence and a button: "Pay invoices online", "Become a customer", "Training classes", "Find a branch". Holds ActionCard children, up to 8; four or five fill a row on a wide screen. ActionCard props: title (required), text, label (the button's words), href (the button's link; without it the card has no button), image, icon (an icon name such as credit-card or users, shown when there is no image). ActionCards props: title, text (a sentence under the title). Link only to pages and features the store has (list them with get_layout). For reasons to buy with no button, use FeatureStrip instead.

<ActionCards title="Start here" text="Tools for running your account.">
  <ActionCard icon="credit-card" title="Pay invoices online" text="Settle open invoices any time." label="Pay now" href="/account" />
  <ActionCard icon="users" title="Become a customer" text="Apply for a trade account." label="Get started" href="/account/sign-in" />
  <ActionCard icon="zap" title="Quick order" text="Order by part number or upload a list." label="Start an order" href="/quick-order" />
</ActionCards>

<CategoryGrid />

Categories as tiles with a picture and a product count, each linking to the listing filtered to it. With no props it shows the top-level categories, with a picture from each one's newest product. Props: title, text (a sentence under the title), limit (how many, default 8), columns (tiles per row on a wide screen, 2 to 6, default 4), categories (which ones and in what order, as category slugs with commas between: "hvac, plumbing, electrical"; sub-categories are allowed). For a photo per tile, write CategoryTile children instead: the grid then shows exactly those, in that order. CategoryTile props: category (the slug, required), image (a photo that fills the tile; left out, the product picture is used), title (in place of the category's name), text (a line in place of the product count, such as "Heating, cooling & ventilation"). A slug that is not a category of the store is skipped. Three looks, with look: "tile" (the default) is a card with the picture above the name; "overlay" fills the tile with the picture and sets the name on it over a shade (best with photos); "chip" is names only in a compact grid, for a long list of categories with no pictures.

<CategoryGrid title="Shop by category" columns="3">
  <CategoryTile category="hvac" image="/categories/hvac.jpg" text="Heating, cooling & ventilation" />
  <CategoryTile category="plumbing" image="/categories/plumbing.jpg" text="Pipe, valves & fittings" />
  <CategoryTile category="electrical" image="/categories/electrical.jpg" text="Wire, power & controls" />
</CategoryGrid>

<FeaturedProducts />

A titled grid of your newest approved products. Props: title, limit, category (a category slug).

<FeaturedProducts title="New in HVAC" category="hvac" limit="4" />

<Brands />

The brands present in your catalog, each linking to its products. Props: title, limit.

<Brands />

<FeatureStrip />

A row of short reasons to buy from you. Holds Feature children, each with an icon, a title and a sentence (the sentence is the child text, or a text prop). Props: title, layout. layout="grid" (the default) is roomy columns with the icon above the words, for three reasons with a full sentence each. layout="bar" is a compact bordered band, icon beside a title and one short line, four across on a wide screen: the benefit bar under a hero ("Fast delivery", "Account pricing", "Easy quotes", "Expert support"). In a bar keep each line to a few words.

<FeatureStrip layout="bar">
  <Feature icon="truck" title="Reliable delivery">To your job site or branch</Feature>
  <Feature icon="tag" title="Account pricing">Your negotiated rates</Feature>
  <Feature icon="zap" title="Quick order">By part number or CSV</Feature>
  <Feature icon="phone" title="Expert support">Real people, real answers</Feature>
</FeatureStrip>

<CallToAction />

A closing band in your primary color. Props: title, text, label, href.

<CallToAction title="Ready to find your part?" label="Browse catalog" href="/product" />

Core

The building blocks every storefront starts with.

<Snippet />

Renders a reusable MDX block from your snippets/ directory.

<Snippet name="hero" />

<ContentBlock />

Styled wrapper for merchandising and editorial content.

Layout

Structure pages without writing CSS.

<Section />

A band of the page that holds anything: Markdown, Grid, Stack, cards, other blocks. Use it to build a part of a page that no ready-made block covers, and to give it a background. Props: eyebrow, title, text (its own heading, optional), width ("wide" the default, "normal" about 60rem, "narrow" a reading column), plus one background: the shared background prop (a theme color), gradient ("primary" a deep gradient of the primary, "accent" from primary to accent, "soft" a light wash), or image (a picture under a dark shade). On a picture, a gradient and the primary, accent and dark backgrounds, the words inside are given a readable color. Also takes spacing, align and hide.

<Section background="primary" align="center" eyebrow="Since 1987" title="Family owned, contractor focused" text="Three branches, one phone number, and people who know the parts.">
  <Stack direction="row" justify="center">
    <Button href="/about">Our story</Button>
    <Button href="/contact" variant="outline">Contact a branch</Button>
  </Stack>
</Section>

<Grid />

Its children side by side, one per cell: text beside a picture, three cards, six logos. Props: cols (1 to 6 on a wide screen, default 2; tablets get fewer by themselves), phone (1, the default, or 2 columns on a phone), gap (none, sm, md, lg, xl), align (stretch, start, center, end: how cells of different heights line up), hide. Put a blank line between children that are Markdown.

<Grid cols="2" gap="lg" align="center">
  <Image src="/about/counter.jpg" alt="The parts counter at our main branch" aspect="landscape" />
  <Stack>
    <Heading size="lg">Counter service that knows your job</Heading>
    <Text tone="muted">Walk in with a part number or a photo. We will find it.</Text>
    <Button href="/product">Browse the catalog</Button>
  </Stack>
</Grid>

<Stack />

Its children in a column, or with direction="row" in a row that wraps: a line of buttons, a heading with a paragraph and a button under it. Props: direction (column, row), gap (none, sm, md, lg, xl), align (stretch, start, center, end), justify (start, center, end, between), hide.

<Stack direction="row" gap="sm">
  <Button href="/product">Shop</Button>
  <Button href="/quick-order" variant="outline">Quick order</Button>
</Stack>

<Spacer />

Empty room between two blocks. Props: size (sm, md, lg, xl), hide. Prefer a block's own spacing prop where it has one.

<Spacer size="lg" />

<Image />

One picture at a chosen shape. Props: src (a file of the store such as "/about/team.jpg", the url from upload_image, or an https address), alt (say what it shows; leave empty only for decoration), aspect (auto the picture's own shape, square, landscape 4:3, wide 16:9, banner 3:1, portrait 3:4), fit (cover fills the shape and crops, contain shows all of it), rounded (none, md, lg, full for a circle with aspect="square"), width (full, sm, md, lg), align (left, center), caption, href (makes it a link), hide. Loaded lazily at the size shown.

<Image src="/about/warehouse.jpg" alt="Racking in our 40,000 square foot warehouse" aspect="wide" rounded="lg" caption="The Dallas distribution center" />

<Gallery />

An even grid of pictures. Holds Image children (src, alt, href, caption). Props: cols (2 to 6, default 3; phones show 2), aspect (square the default, landscape, wide, portrait), rounded, hide.

<Gallery cols="4">
  <Image src="/gallery/branch-1.jpg" alt="Main branch counter" />
  <Image src="/gallery/fleet.jpg" alt="Delivery trucks at the dock" />
</Gallery>

<Heading />

A heading at a chosen size, apart from its place in the page's outline. Props: size (sm, md, lg, xl), level (1 to 4, default 2; use 1 at most once, and not on a page with a Hero), eyebrow (a small line above), align (left, center), hide. The words are the child text, or a text prop.

<Heading size="lg" eyebrow="Services" align="center">More than parts</Heading>

<Text />

A paragraph at a chosen size and tone. Props: size (sm, md, lg, xl), tone (default, muted, primary), align (left, center), hide. The words are the child text (Markdown works), or a text prop.

<Text size="lg" tone="muted">Same-day pickup at three branches.</Text>

<Video />

A YouTube or Vimeo video, by its ordinary watch address. Props: src, title (what the video is, for screen readers), caption, hide. Only those two players are embedded; any other address shows nothing. For a video file of the store's own there is no block.

<Video src="https://www.youtube.com/watch?v=VIDEO_ID" title="How to read a furnace data plate" />

<Testimonials />

What customers say, as cards. Holds Testimonial children: quote (required), name, role (their job and company), image (a small portrait). Props: title, plus spacing, background, align, hide. Use only real quotes the store gave you: never write one.

<Testimonials title="What contractors say" background="muted">
  <Testimonial quote="They had the board in stock and on my truck in an hour." name="Dana Ortiz" role="Owner, Ortiz Mechanical" />
</Testimonials>

<Stats />

A row of large numbers with a label each. Holds Stat children: value (required: "25,000", "3", "98%"), label, text (a smaller line). Props: title, plus spacing, background, align, hide. Use only numbers the store gave you.

<Stats background="primary" align="center">
  <Stat value="25,000" label="parts in stock" />
  <Stat value="3" label="branches" />
  <Stat value="1 hr" label="will-call pickup" />
</Stats>

<LogoCloud />

A row of logo pictures the store supplies: brands it carries, partners, certifications. Holds Logo children: image (required), alt (the name), href. Props: title, plus spacing, background, align, hide. For brand names from the catalog without pictures, use Brands instead.

<LogoCloud title="Authorized distributor for" align="center">
  <Logo image="/logos/brand-a.svg" alt="Brand A" href="/product?brand=Brand%20A" />
  <Logo image="/logos/brand-b.svg" alt="Brand B" />
</LogoCloud>

<Card />

Card with optional title, icon, link, and horizontal layout.

<Card title="Shipping" icon="truck" href="/shipping" />

<CardGroup />

Responsive grid of Cards. Props: cols (2 to 4, default 2).

<CardGroup cols={2}>
  <Card title="Shipping" icon="truck">Same-day on stocked items.</Card>
  <Card title="Returns" icon="rotate-ccw">Thirty days, no questions.</Card>
</CardGroup>

<Columns />

Multi-column layout container. Props: cols (2 to 4, default 2).

<Accordion />

Collapsible content section. Props: title (the line that is always shown), icon, defaultOpen (starts open).

<AccordionGroup />

Grouped accordions, for a list of questions and answers.

<AccordionGroup>
  <Accordion title="Do you ship special orders?">Yes. Contact the team and we confirm the lead time.</Accordion>
</AccordionGroup>

<Tabs />

Tabbed content with Tab children.

<Tabs>
  <Tab title="Overview">Overview content.</Tab>
  <Tab title="Specs">Specification content.</Tab>
</Tabs>

<Steps />

Numbered step-by-step walkthroughs, with Step children.

<Steps>
  <Step title="Browse">Find products in the catalog.</Step>
  <Step title="Check">Read the specifications on the product page.</Step>
</Steps>

<Frame />

Framed media or image container. Props: caption.

<Divider />

Horizontal separator.

<Expandable />

Inline expandable detail section. Props: title (the link that opens it, default "Show more").

Content

Callouts, badges, and inline elements for rich pages.

<Callout />

Typed callout — note, info, tip, warning, or check. Props: type, title, icon.

<Callout type="tip">Order before 2pm.</Callout>

<Note />

Note callout shorthand.

<Info />

Info callout shorthand.

<Tip />

Tip callout shorthand.

<Warning />

Warning callout shorthand.

<Warning title="Lead time">Allow two weeks for special orders.</Warning>

<Check />

Success callout shorthand.

<Banner />

Full-width announcement banner. Props: type (info, note, tip, warning, check, danger).

<Badge />

Small status or label badge. Props: color.

<Badge color="success">In stock</Badge>

<Button />

Styled link button with safe URLs. Props: href, icon, variant.

<Button href="/product" icon="shopping-bag">Shop now</Button>

<Icon />

An icon by name, from the store's icon set (Lucide unless the store picks another). Put a set in front of the name to use it once: lucide, tabler, fontawesome, fontawesome-regular, fontawesome-brands, phosphor, heroicons or material. The same names work in the icon prop of Card, Feature, Button and Accordion. Props: name, size, library.

<Icon name="truck" /> <Icon name="tabler:rocket" size="24" />

<Tooltip />

Hover tooltip for inline hints. Props: tip (the words shown).

<Avatar />

Circular image or initials. Props: src, alt, fallback (initials shown without a picture).

<Breadcrumbs />

Hierarchical navigation trail. Without props it follows the page's place in the store. Props: items, a list written in braces: {[{label: "Home", href: "/"}, {label: "About"}]}.

<Pagination />

Previous/next page navigation. Props: page, totalPages, baseHref.

<Code />

Syntax-styled code block. Props: title, language.

<CodeGroup />

Grouped code blocks with titles.

<Socials />

The store's social links, set once (set_socials, or Design > Social links) and drawn wherever this is written: a contact page, an about page, a snippet. Each link opens in a new tab and carries the network's own mark. Props: variant (icons the default, round icon links; buttons, the mark and the network's name in a button; labels, the mark and the name as plain links), size (sm, md, lg), networks (a subset and an order, written "instagram, linkedin"; left out, every link in the store's order), label (its name for screen readers, default "Follow us"). It has no props for addresses: the links are the store's. With no links set it shows nothing.

<Socials variant="buttons" networks="instagram, linkedin" />

<ContactDetails />

How to reach the store, set once (set_contact, or Design > Contact) and drawn wherever this is written: the phone number as a link that dials it, the email as a link that writes to it, the address and the opening hours on the lines they were written in. Props: show (a subset and an order, written "phone, email"; left out, everything that is set, from phone, email, address, hours), layout (stack the default, one under another; row, side by side), title (a heading above them). With nothing set it shows nothing.

<ContactDetails title="Get in touch" show="phone, email, hours" layout="row" />

<Form />

A form a visitor fills in and sends: a contact form, a quote request, a newsletter sign-up. Each message arrives in the dashboard under Customers > Messages, is emailed to the store's team (who can reply straight to the visitor) and is told to webhooks as form.submitted. Props: name (required; lowercase letters, digits and dashes, used once on the page; messages are filed under it), title, text (a sentence under the title), submitLabel (default "Send"), success (the words shown after sending). It holds only <Field /> items, up to 30, each with name (required, used once in the form), label, type (text the default, email, phone, number, textarea, select, combobox, radio, checkbox, checkboxes, switch, date, slider), required (written bare), placeholder, help (a line under the field), options (a list in braces, needed by select, combobox, radio and checkboxes), min, max and step (number and slider), width (full the default, half to sit two side by side). There is no prop for where a message goes and no file or hidden field. The draft preview draws the form but does not send.

<Form name="contact" title="Talk to sales" submitLabel="Send" success="Thanks. We reply within a day.">
  <Field name="name" label="Your name" required />
  <Field name="email" type="email" label="Work email" required />
  <Field name="topic" type="select" label="Topic" options={["Quote", "Account", "Other"]} />
  <Field name="message" type="textarea" label="Message" required />
  <Field name="consent" type="checkbox" label="You may contact me about this." required />
</Form>

Overlays and rich content

Dialogs, side panels and popovers that open on request, a carousel of anything, tables, charts, embeds and small parts.

<Dialog />

A button or link that opens a window over the page, holding anything written inside it: a sizing chart, delivery terms, a longer explanation that would crowd the page. Choose it when the reader should come back to where they were. Props: trigger (required, the words that open it), triggerStyle (button the default, or link to sit in a line of text), title (the window's heading; the trigger's words are used without one), description (a line under the heading), size (sm, md, lg). Closes with its close button, the Escape key or a click outside. Written inside a line of text it holds words only; to hold a table or paragraphs, write it on lines of its own with a blank line before and after what is inside. The same holds for Sheet, Drawer, Popover and HoverCard.

<Dialog trigger="Sizing chart" triggerStyle="button" title="Filter sizes">

| Nominal | Actual |
| --- | --- |
| 16 x 20 x 1 | 15.5 x 19.5 x 0.75 |
| 20 x 25 x 1 | 19.5 x 24.5 x 0.75 |

</Dialog>

<Sheet />

A button or link that slides a panel in from an edge of the screen, holding anything written inside it. Choose it over Dialog for longer content the reader scrolls: a full policy, a list of branches, a spec sheet. Props: trigger (required), triggerStyle (button, link), title, description, side (right the default, left, top, bottom).

<Sheet trigger="Shipping and returns" title="Shipping and returns" side="right">

Orders placed before 2pm ship the same day.

Returns are accepted within thirty days.

</Sheet>

<Drawer />

A button or link that pulls a panel up from the bottom of the screen, which a phone user can drag down to close. Choose it for a short task or a few options on a page mostly read on phones. Props: trigger (required), triggerStyle (button, link), title, description.

<Drawer trigger="Store hours" title="Store hours">

Monday to Friday, 7am to 5pm. Saturday, 8am to noon.

</Drawer>

<Popover />

A button or link that opens a small panel beside itself when pressed, without covering the page: a definition, a short note, a few links. Props: trigger (required), triggerStyle (button, link). For one line of words shown on hover use Tooltip; for a window over the page use Dialog.

<Popover trigger="What is a core charge?" triggerStyle="link">

A deposit refunded when you send back the old part.

</Popover>

<HoverCard />

Words in a line of text that show a small card when the pointer rests on them or the keyboard focus reaches them: a preview of what a link leads to, a person, a brand. Props: trigger (required, the words), href (makes the words a link). What it holds must not be the only place something is said: a touch screen has no hover, so there the card does not open.

<HoverCard trigger="Ortiz Mechanical" href="/customers/ortiz">

A family HVAC contractor in Dallas and a customer since 2009.

</HoverCard>

<Collapsible />

One line that opens and closes what is written inside it, in place. Props: title (the line that is always shown), open (written bare: starts open), hide. For a list of questions and answers use AccordionGroup with Accordion children.

<Collapsible title="Show the full specification">

Rated for 40 to 115 degrees. UL listed. Five year warranty.

</Collapsible>

<Carousel />

Slides a visitor flips through, each holding anything: a card, a picture with words, a quote. Holds Slide children, up to twelve. Props: perView (1 to 4 slides side by side on a wide screen, default 1; a phone always shows one), interval (seconds per slide, 3 to 30; left out, slides move only when asked), ratio (auto the default takes the height of the tallest slide; wide 16:9, standard 4:3 and square fix the shape), label (what the carousel is, for screen readers), hide. Has previous and next buttons, dots and arrow keys; never plays for a visitor who asked for reduced motion. For full-width promotional pictures use PromoCarousel.

<Carousel perView="3" label="Customer stories">
  <Slide>
    <Card title="Ortiz Mechanical">Cut their truck stock in half.</Card>
  </Slide>
  <Slide>
    <Card title="Lakeside Property">One invoice for forty buildings.</Card>
  </Slide>
  <Slide>
    <Card title="Northgate Schools">Filters on a schedule.</Card>
  </Slide>
</Carousel>

<Table />

Dresses a Markdown table written inside it. Props, each written bare: striped (every other row shaded), compact (tighter rows), stickyHeader (the table scrolls in a fixed height and its heading row stays in view; for a long table). Also caption (a line under the table saying what it shows) and hide. A Markdown table by itself needs no block; use this only for these options. Put a blank line before and after the table.

<Table striped compact caption="Prices per case, effective January">

| Part | Size | Case of |
| --- | --- | --- |
| FLT-1620 | 16 x 20 x 1 | 12 |
| FLT-2025 | 20 x 25 x 1 | 12 |

</Table>

<Progress />

A bar filled part of the way: stock left, a goal reached, a step of a process. Props: value (required, 0 to 100), label (what is measured, shown above the bar beside the number), hide. Use only a number the store gave you.

<Progress value="72" label="Spring order window" />

<Chart />

A small chart of one row of numbers. Props: type (bar the default, line, area, pie), data (required, a list written in braces of up to 24 {label, value} entries), unit (written after each number: "%", " lbs"), title, hide. Use only numbers the store gave you: never invent data. The numbers are also given as a table to screen readers and to a visitor without scripts.

<Chart type="bar" title="Orders shipped same day" unit="%" data={[{label: "Jan", value: 92}, {label: "Feb", value: 95}, {label: "Mar", value: 97}]} />

<ButtonGroup />

Button children joined edge to edge into one control: two or three closely related choices. Props: orientation (horizontal the default, vertical), hide. For buttons with space between them use Stack with direction="row".

<ButtonGroup>
  <Button href="/product" variant="outline">Catalog</Button>
  <Button href="/quick-order" variant="outline">Quick order</Button>
</ButtonGroup>

<Item />

One row: an icon or a small picture, a title, a line of words, and a link at its end. Use several in a Stack for a list of documents, contacts, branches or services. Props: title (required), text, icon or image (one of them, at the start), href with label (a small button at the end; with href and no label the whole row is the link), variant (default, outline, muted), hide.

<Item icon="file-text" title="Credit application" text="PDF, two pages" href="/files/credit-application.pdf" label="Download" variant="outline" />

<Kbd />

A key or a key combination, drawn as keys, inside a line of text. The key is the child text, or keys for a combination with " + " between the keys.

Press <Kbd keys="Ctrl + K" /> to search, or <Kbd>Esc</Kbd> to close.

<Empty />

A quiet panel that says there is nothing here yet and what to do about it: no promotions this month, a page still being written. Props: title (required), text, icon, href with label (one button), hide.

<Empty icon="tag" title="No promotions this month" text="New offers are posted on the first Monday." href="/product" label="Browse the catalog" />

<AspectRatio />

Holds what is inside it at a fixed shape, cropping a picture to fit: the way to make pictures or embeds of different shapes line up. Props: ratio (wide 16:9 the default, square, landscape 4:3, portrait 3:4, banner 3:1), rounded (md, none, lg), hide. For one picture the Image block's own aspect prop is simpler.

<AspectRatio ratio="square">
  <Embed provider="map" query="1200 Commerce St, Dallas, TX" title="Our main branch" />
</AspectRatio>

<ScrollArea />

A box of a fixed height that scrolls what is inside it: long terms, a changelog, a long list that should not push the rest of the page down. Props: height (md about twenty lines the default, sm, lg), label (what it holds, for screen readers), hide.

<ScrollArea height="sm" label="Terms of sale">

All sales are subject to these terms.

Prices may change without notice.

</ScrollArea>

<Embed />

A map, a video or a booking calendar from a fixed list of providers. Props: provider (required: map, youtube, vimeo, calendly), then id (the video's id from its address for youtube and vimeo; "name/event" for calendly) or query (an address or place name, for map), title (what it is, for screen readers), caption, hide. The address is built by the platform: no other site can be embedded, and anything it cannot build shows nothing.

<Embed provider="map" query="1200 Commerce St, Dallas, TX" title="Our main branch" />

Header and footer

The parts a store's own header (theme/header.mdx) and footer (theme/footer.mdx) are composed from. They are written in those two files only, never in a page.

Only in the store's header composition (theme/header.mdx, saved with set_header_layout) and footer composition (theme/footer.mdx, saved with set_footer_layout); each block says which. Written in a page they show the notice for a component that does not exist. Beside them a composition may hold Section, Grid, Stack, Spacer, Heading, Text, Image, Button, Badge, Icon, Divider, Socials and ContactDetails, and a footer may hold a Form; no other page block.

<HeaderBar />

One bar of the header: its children side by side, centered on the bar's height, inside the page's gutters. A header is one or more of these, one under another. Props: tone (plain the default, the page's own background; primary, filled with the primary color with readable words; muted, a quiet surface), size (md the default, sm for a slim bar, lg for a tall one), justify (start the default; center; between, the first child at one end and the last at the other; thirds, three children with the middle one centered on the page). A header composition is what a screen from a tablet up shows; a phone keeps the built-in compact header and its menu button, which read the same menu, categories and button.

<HeaderBar>
  <HeaderLogo />
  <HeaderMenu />
  <HeaderSearch />
  <HeaderActions />
</HeaderBar>

<HeaderLogo />

The store's logo (or its name, when it has no logo), linked to the home page or to where the store sends its logo. In the header and in the footer. Props: size (md the default, sm, lg). It takes no picture or address of its own: both are the store's branding (set_branding).

<HeaderLogo size="lg" />

<HeaderMenu />

The store's menu (set_navigation), which takes the room left in its bar. Props: variant (dropdown the default, an entry with children opens them as a list under it; inline, every entry a plain link and an entry with no link of its own replaced by its children; mega, an entry with children opens a wide panel with its children in columns), categories (written bare: the catalog's top-level categories first, as a Products entry), align (start the default, center, end). It has no props for links: the entries are the store's menu. A header composition is what a screen from a tablet up shows; a phone keeps the built-in compact header and its menu button, which read the same menu, categories and button.

<HeaderMenu variant="mega" categories />

<HeaderSearch />

The product search box, which sends a visitor to the store's search page. Props: size (compact the default, a rounded field of a fixed width; wide, a large box with a button that takes the room left in its bar). It works without JavaScript.

<HeaderSearch size="wide" />

<CategoryBar />

A slim row of the catalog's top-level categories, each a link to the product listing filtered to it, after an "All products" link. It is a bar of its own: write it after a HeaderBar, not inside one. A long row scrolls sideways. With no categories it shows nothing. A header composition is what a screen from a tablet up shows; a phone keeps the built-in compact header and its menu button, which read the same menu, categories and button.

<CategoryBar />

<ModeToggle />

The button that switches the store between light and dark for this visitor. It takes no props, and shows nothing unless the theme offers the choice (set_theme with toggle: true).

<ModeToggle />

<HeaderButton />

The navbar's highlighted button (set_layout: navbar.button), as a filled button or an outlined one. In the header and in the footer. Props: variant (primary the default, outline). Its words and its link are the store's setting, and with no button set it shows nothing.

<HeaderButton />

<HeaderActions />

The cart, quick order and the account menu (sign in, or the buyer's own menu). Required: a header composition holds exactly one, anywhere in it, and a header without exactly one is refused. It takes no props: what it shows is decided by who is looking (a visitor, a buyer, a role that may order) and never by the page, and a store's custom CSS cannot style it. Put it on a plain or muted bar: its words keep the page's own color. A phone's compact header has its own.

<HeaderActions />

<FooterColumns />

The footer's link columns, side by side: the columns set for the store (set_layout: footer.columns), each a title over its links, or with none set one "Explore" column of the home page, the menu and search. It takes no props: the links are the store's settings.

<FooterColumns />

<FooterLinks />

The store's menu as one flat line of links that wraps: an entry's own link, or its children when it has none. Props: label (its name for screen readers, default "Footer").

<FooterLinks />

<FooterCategories />

A column of the catalog's first six top-level categories and an "All products" link, under a title. Props: title (default "Shop"). With no categories it shows nothing.

<FooterCategories title="Shop" />

<FooterTagline />

The sentence under the logo in the footer: the store's own (set_layout: footer.tagline), or the built-in one. It takes no props.

<FooterTagline />

<Copyright />

The copyright text alone: the sign, this year and the store's name, placed where the footer wants it. It takes no props. The platform draws a line under every footer with the copyright and "Powered by Tryeon"; when the footer places this block, that line leaves the copyright out, so it is shown once, and keeps "Powered by Tryeon".

<Copyright />

Safe by design

Storefront MDX compiles through a strict allowlist — only these components and a safe subset of HTML render. Imports, scripts, and raw expressions are stripped before anything reaches your buyers. Read more on our Security page.