Landing
LandingCodeShowcase
Code editor window with one tab per file, syntax highlighting, highlighted lines, an optional autocomplete hint and a copy button. Shows developers what working with the product looks like.
components/landing/LandingCodeShowcase.vue
View in the demo
Example
A landing page is an array of data
Each page is a typed content file. LandingPage turns it into sections with their tone and spacing.
- Autocomplete on every prop
- Reorder sections without touching CSS
- One file per language
export const en: LandingPageContent = { seo: { title: 'Admin and landing template' }, sections: [ { type: 'hero', props: { variant: 'devices', title: '…' }, }, { type: 'portfolio', id: 'demos', props: { … } }, { type: 'pricing', tone: 'muted', props: { … } }, { type: 'faq', props: { searchable: true } }, ],}Ln 5, Col 19 · LandingBlockTypeScript
In your content
Section blocks are rendered by LandingRenderer from the sections array of a landing. Add this one to your content:
sections: [
{
type: 'code',
tone: 'surface',
props: { … },
},
]
The props follow LandingCodeShowcaseProps in types/components/landing.ts; the table below lists them.
API
Props
Name | Type | Default | Description |
|---|---|---|---|
filesrequired | LandingCodeFile[] | — | Files of the entry. |
bullets | string[] | [] | Short points with a check. |
action | LandingAction | — | A LandingAction: label plus to or href, and kind. |
eyebrow | string | — | A short label above the title. |
title | string | — | The heading of the block. |
description | string | — | The sentence under the title. |
heading-id | string | — | The id of the heading, used by aria-labelledby and anchors. |
align | LandingHeadingAlign | "start" | start or center heading. |