Landing Page
Build the marketing page that sits in front of your docs.
Five components compose the page in front of your docs: Hero, FeatureGrid with Feature, CTA, and the Action link the first and third share. Each one
renders its own full-width <section> with the container, padding, and vertical
rhythm already set, so a landing page is a handful of components rather than a
wall of layout classes.
They draw every colour from the same design tokens as your docs, so they follow your theme preset and both colour schemes with nothing to configure.
Usage
Pass layout="page" to DocsShell so the shell drops the sidebar and table of
contents and gives the sections the full width of the viewport.
npm create svelte-docsmith scaffolds a landing page built from these, so the
fastest way to see them running is to start a project and edit the result.
Hero
The opening section. Give it a media snippet and it becomes a two-column
split, with your headline on the left and a code sample, screenshot, or live
component on the right. Leave media off and the hero centres on a single
column instead, which suits a project that leads with a sentence rather than a
screenshot.
title and description each take a plain string or a snippet. Reach for the
snippet form when you want to mark part of the headline up, such as colouring
one word with text-primary.
title required stringSnippet description stringSnippet eyebrow Snippet actions Snippet Action links.media Snippet Feature grid
A grid of short capability blurbs. FeatureGrid owns the section heading and
the layout; each Feature is one cell, with an optional icon rendered in a
tinted square beside the text.
Set background="muted" to tint the band and rule it top and bottom. Alternate
it against the sections either side and the page reads as distinct bands rather
than one continuous scroll.
title string description string columns 23 default 3background 'default''muted' default 'default'muted tints the band and adds a rule above and below.children required Snippet Feature cells.title required string icon Snippet children Snippet CTA
The closing panel: a bordered card with a soft glow behind the heading, so the
page ends on your primary colour instead of trailing off. Use before for a
note that should sit above the heading (for example a pre-release Callout) so
the section still ends on the actions; use children for content below them.
title required string description string actions Snippet before Snippet children Snippet Action
The call-to-action link used by Hero and CTA. primary is the filled
button, secondary the outlined one that sits beside it. The primary variant
carries a trailing arrow that nudges on hover; turn it off with arrow={false}.
It is deliberately small. Anything more elaborate, such as a button that copies
an install command to the clipboard, is clearer written as your own markup
inside the actions snippet.
href required string variant 'primary''secondary' default 'primary'external boolean default falserel="noopener noreferrer".arrow boolean primary, off for secondary.children required Snippet