Landing kit
@peleda-app/landing builds product pages: heroes, sections, frames, code and terminal blocks, and the family header and footer shared by every peleda site.
Site and identity
Site scopes a theme to its subtree. It takes a site identity, generates its CSS with createTheme and themeToCss, and renders it in a <style> next to the children, so several identities can share one page.
tsx
import { FamilyFooter, FamilyHeader, familyLinks, Site, SkipLink } from '@peleda-app/landing'
import { identity } from '@peleda-app/tokens/identities'
const id = identity('pellet')
export function Page() {
return (
<Site identity={id}>
<SkipLink />
<FamilyHeader
links={[{ href: '/docs/', label: 'Docs' }]}
cta={{ href: '/docs/', label: 'Install' }}
repo={id.repo}
/>
<main id="main">…</main>
<FamilyFooter
blurb={id.tagline}
groups={[familyLinks]}
legal="peleda"
status={[]}
repo={id.repo}
/>
</Site>
)
}siteCss(identity)returns the same CSS for use outside React.useSite()reads the identity;Logo,LogoGlyphandLogoWordmarktake the glyph and name from it.Motifdraws the identity's background pattern;useSiteMotif()returns its name.- Inside a site,
data-scheme="dark"or"light"on an element (orScheme) forces that scheme for its subtree.Section tone="inverse",Hero inverseandCtaBand tone="inverse"use it. familyLinksis a footer group with every public project;FamilyHeaderandFamilyFooterare the shared header and footer.
Parts
| Area | Components |
|---|---|
| Layout | Container, Section, SectionHeading and its parts, FeatureGrid, FeatureSplit, SiteHeader, Nav, MobileNav, Footer |
| Hero | Hero, HeroContent, HeroEyebrow, HeroTitle, HeroLead, HeroActions, HeroMeta, HeroMedia |
| Content | FeatureCard, FeatureCardStack, Stats, Steps, ComparisonTable, Faq, Quote, Testimonial, Pricing, ChangelogEntry, LogoCloud, CtaBand, AnnouncementBar, NewsletterForm |
| Code | CodeBlock, CodeShowcase, InstallCommand, TerminalWindow, CopyIconButton |
| Frames | BrowserFrame, AppFrame, WindowControls |
| Small | LinkButton, Pill, IconTile, LicenseBadge, OpenSourceBadge, StatusFooterLine, SkipLink |
CodeBlock highlights with a small built-in tokenizer (tokenize), so no highlighter ships to the browser.
Page examples for each identity are in Storybook under Landing / Pages.