Skip to main content

Landing components

Every section type a tab landing is built from, rendered live, with the role, limits, and authoring shape of each.

Each tab opens a landing per build target it serves (docs/<tab>/snapchat.mdx, specs.mdx, and camera-kit.mdx; Design has only specs.mdx). This page renders every component those landings are built from, once each, with real links, so you can see what you're choosing between. View the page source for the authoring. For where landings fit in the site, see Adding documentation.

Page recipe

Build a landing top to bottom in this order, one section type per section:

  1. Do this first: <Steps> (Get Started, Publish) or one or more <Banner>s (Develop, Build with AI).
  2. The main topics: <LinkDirectory variant="featured">, or <Showcase> / <MediaGrid> for what you can make.
  3. Choices: <LinkDirectory> boxes, or <LinkGrid compact> for single destinations.
  4. The tab's map: <LinkDirectory variant="index">, grouped under the sidebar's own top-level groups as ### headings when the tab has more than one.
  5. The close: <HelpList>.

Alternate boxed and unboxed sections, so the page doesn't read as a wall of cards. Boxed: Steps, Banner, featured cards, boxes, LinkGrid, MediaGrid. Unboxed: Showcase, index rows, LinkChips, and HelpList.

Don't repeat the page's description in an intro paragraph: the description already renders under the page's title. Link only pages the landing's build target can see.

Enforced by the build

These fail the build, with a message naming the page and what to fix:

  • A <LinkDirectory> variant other than featured, boxes, or index.
  • An index row with a description.
  • Featured cards or boxes where only some items have a description: every item has one, or none does.
  • <Showcase> used more than once on a page.
  • A link on a tab landing to a page its build target can't see: one whose targets leave the landing's target out, or an unlisted or draft page. A partial that landings import, such as build-with-ai/_shared.mdx, is checked for each of them, and a link inside a <TargetBlock> only for the block's targets.
  • An unknown <CardIcon> name, and any component's own authoring errors, such as a <HelpList> line without a link or a <Banner> without its action link.

The checks are in src/core/landingRules.ts (read by LinkDirectory) and src/plugins/remarkLandingRules.ts.

Type scale

LevelSize and weightWhere
Section24px, 700## headings
Group18px, 700### headings over index groups
Featured card title20px, 700variant="featured"
Index row title16px, 500variant="index"
Box title15px, 500<LinkDirectory> boxes
Index link14px, 400, bluevariant="index"
Card link13.5px, 500, bluefeatured cards and boxes

Columns

Featured cards, boxes, <LinkGrid>, <Steps>, and <MediaGrid> pick how many cards sit across from how many there are (src/components/Landing/gridColumns.ts), so no card is left alone on its last row. Each is a cap: as the column narrows below a card's minimum width, fewer fit, and phones stack them (MediaGrid keeps two across).

CardsAcross (most 3)Across (MediaGrid, most 4)
222
333
42 × 24
53 + 23 + 2
63 × 23 × 2

Minimum card widths: featured 260px, boxes 240px, Steps 240px, LinkGrid 200px (260px compact), MediaGrid 200px.

Icons

A card's icon comes from where its first link goes (src/core/cardIcons.ts). When that icon is wrong, or neighbouring items share one, open the item with <CardIcon name="…" />. LinkDirectory (every variant), <LinkGrid>, and <HelpList> read it. name is a file in static/img/lens-studio/card-icons without .svg, listed in src/core/cardIconNames.ts. An unknown name fails the build.

Steps

  1. Install Lens StudioLens Studio for macOS or Windows. Download Lens Studio
  2. Find your way aroundThe panels you'll use for every Lens. Panels
  3. Preview your LensTry it in the editor before it reaches a device. Previewing Your Lens
  • Role: the numbered quickstart that opens Get Started and Publish. The first step's action is the page's primary button; the rest are secondary.
  • Not for: a list of topics with no order, or more than a handful of steps.
  • Shape: a numbered list. Each item is a bold title, a sentence or two, and its one action as the item's last link.
  • Rows: when any step holds a block, such as a prompt to copy, every step becomes a full-width row. Write that step as a loose item: the title paragraph, the block, then the action alone in its own paragraph.
  • Icon: none; steps are numbered.
  1. Install CLAD in your agentPaste this prompt into your agent:
    Install https://github.com/lens-studio-devs/ls-extensions.git for me
    Learn more
  2. Open your agent in your Lens Studio project folderLens Studio 5.25 and later connect your agent through the MCP server. Setup guide
  • Role: a call to action, an inverted navy band. Stack several when a page has more than one.
  • Not for: a destination that isn't the reader's real first step. Take its copy from the target page's own description.
  • Shape: one paragraph: a bold title, a line, and the action as the last link.
  • Icon: from where the action links.
  • Role: the page's main topics, two or three across: what to read after its first step.
  • Not for: a tab's full map (use index rows) or a single destination (use LinkGrid).
  • Shape: each item is a link (an area's entry page) or bold text (a goal), an optional line, then a bulleted list of its links in reading order. They render as a row of blue links, with no label and no numbers.
  • Icon: from the heading's link, else its first link; <CardIcon> overrides.

Boxes

A game

Take touch input, add physics, and keep score.

A try-on Lens

Put your product's 3D model on the user.

A Bitmoji Lens

Bring the user's Bitmoji into the Lens.

  • Role: choices: goals or groups of related links, each on its own surface.
  • Not for: the page's main topics (featured) or a long map (index rows).
  • Shape: the same as featured cards. Keep descriptions consistent within a section: every box has one, or none does.
  • Icon: on a plate tinted with the icon's own colour; <CardIcon> overrides, as on the first box here, whose first link would give it the Scripting icon.

Index rows

Foundation

Capabilities

  • Role: the tab's map: one row per area, its title on the left and its links on the right, between hairlines. On phones each row stacks.
  • Not for: the page's main topics, or a section of two or three groups (use boxes).
  • Shape: each item is a link to the area's entry page, then a bulleted list of its key links. Leave out row descriptions, so the rows stay uniform. When the tab's sidebar has more than one top-level group, put one index under a ### heading per group, in sidebar order.
  • Icon: from the row's link; <CardIcon> overrides.

LinkGrid

  • Role: single destinations, each a clickable card with a title and a line. compact gives rows for "Next steps" and short lists of kits or tools; without it, taller tiles.
  • Not for: a destination with several links of its own (use boxes).
  • Shape: a bulleted list; each item is a link, then its line.
  • Icon: from the link; <CardIcon> overrides.

MediaGrid

  • Role: what you can make: a still of each effect, a title, and a line, the whole card a link.
  • Not for: pages without real stills of the effect.
  • Shape: each item is an image, then a link, then its line. Stills are small 640×400 JPEG files in static/img/landing-media, never video. An item that's only a link is a "see all" tile in a dashed outline, for the last cell; it counts as a card for the columns.
  • Icon: none; the still is the picture.

Showcase

  • Role: the same items as MediaGrid, one at a time: a list beside a large still of the selected item. For the section a newcomer should look at first.
  • Not for: more than once per page.
  • Shape: the same as MediaGrid items, without the "see all" tile.
  • Icon: none.

LinkChips

  • Role: a long list of features to explore, as quiet text rows between hairlines.
  • Not for: a handful of links that deserve a line each (use LinkGrid).
  • Shape: a bulleted list of links, nothing else.
  • Icon: none.

HelpList

  • Role: the page's quiet close: one sentence per way to get help or keep up, each holding its link, under a hairline.
  • Not for: the page's main links, or a line without a link (the build fails).
  • Shape: a bulleted list of sentences.
  • Icon: from the line's first link; off-site links usually need <CardIcon>, as the last line here does.

Home page only

These build the home page (docs/index.md) and aren't for tab landings.

  • <HomeActions>: a row of buttons. The first link is the filled main action; <HomeActions secondary> outlines them all, for a section's own action, such as the Build with AI spotlight's.
  • <SearchBox>: a field that opens Search. An optional list of links renders as pills under it.
  • <PlatformChooser />: one card per build target. Each links to that target's Get Started landing and selects the target. It shows only until a target is chosen; <PlatformChooser always /> shows it to every reader, as below.
  • <HomeSpotlight>: a tinted band: its ## heading and pitch on the left, its bulleted list as compact link cards on the right. Rows that differ by build target go in a <TargetBlock> each, with any pitch of their own.
  • <HomeResources>: two <section>s side by side, such as quick links beside Community and feedback.
  • <ClosingLink>, <DevelopLink />, and <ResourcesLink />: arrow links that close a home section. DevelopLink and ResourcesLink point to the reader's own Develop or Resources landing.

The other registered components aren't landing sections: <TargetBlock> (see Inline differences), and <ApiBadges> and <ApiMemberIndex> on the generated API reference.

Build for

Build with AI

CLAD gives your coding agent Lens Studio skills and a live connection to the editor.