Skip to content
TrademarkTrademark
Docs
Components

Page sections

Updated: November 19, 2026
View on GitHub

A landing page is a stack of sections: a hero, what the product does, what people say about it, the prices, the questions, a last call and a way to get in touch. @once-ui-system/blocks has one tag for each. You fill in its content through props and pick its arrangement with layout. Every layout shows the same fields, so switching layouts never hides anything you wrote.

Each section reads its props defensively. Content often comes from an editor, a JSON file or a model, so a missing, misspelled or mistyped prop renders as nothing instead of throwing. A section never shows sample copy of its own.

The sections add no outer padding. The page sets the gutter and the space between sections.

Installation

HeroSection

The page's opening: eyebrow, headline, lead, two buttons and a picture. The headline is the page's h1. Each button shows only when it has both a label and a link.

Layouts (heroLayouts):

  • split (default): the words beside a portrait picture.
  • centered: centered words over a wide picture.
  • cover: the picture in a tall rounded frame, the words over its faded foot.
  • boxed: the words and a picture inside a framed box.
  • fullscreen: the picture fills most of the screen, the headline large at its foot.
  • halves: the section cut in two, the words on one half and the picture filling the other.
  • editorial: a very large headline, the lead and buttons side by side under a rule, the picture a wide band beneath.

heroLayoutGuide holds one sentence per layout on when it suits, for an editor's tooltip or a model choosing one.

FeaturesSection

What a product or service does, one point per item. Each item takes an icon name from the icon set, a title and a description.

Layouts (featuresLayouts): cards (default), list, split. columns ("2", "3" or "4", default "3") applies to cards and steps down on smaller screens.

TestimonialsSection

What customers say, one quote per item, with a name, a role and an optional avatar.

Layouts (testimonialsLayouts): cards (default), spotlight, plain.

PricingSection

Plans side by side. features is a string with one feature per line. highlighted marks the plan to stand out, and badge adds a label to it. ctaLabel and ctaHref add a button to a plan.

Layouts (pricingLayouts): cards (default), list. price is shown as written, so include the currency.

FaqSection

Questions and answers, one pair per item.

Layouts (faqLayouts): stacked (default), split, grid.

CtaSection

The one thing to do next, usually the page's last section.

Layouts (ctaLayouts):

  • banner (default): a band of the brand color.
  • split: the words and the buttons on one line in a frame.
  • minimal: unframed and centered.
  • cover: the words over a photo across the page's width, from image and imageAlt. Without an image it draws the banner.

ContactSection

Email, phone, address and opening hours. The email and phone become mailto: and tel: links, and the address links to mapHref when given. address and hours take one entry per line. A detail that is not given is left out.

Layouts (contactLayouts): split (default), cards, centered.

AboutSection

A longer story beside a picture. A blank line in body starts a new paragraph. imageSide ("right" or "left") applies to split.

Layouts (aboutLayouts): split (default), stacked.

GallerySection

Photos, each with an image, an alt and an optional caption. Every photo opens large on a click.

Layouts (galleryLayouts):

  • grid (default): even tiles.
  • mosaic: the first photo takes two thirds of the width beside two stacked, the rest in tiles beneath.
  • masonry: each photo keeps its own shape, in columns.

LogosSection

Logos of clients, press or partners. Each item takes a src, an optional srcDark used in dark mode, and an optional href.

Layouts (logosLayouts): row (default, one centered line that wraps), grid (each logo in its own tile). An item without src is left out.

StatsSection

A few figures, each with a value, a label and an optional description. value is a string, shown as written.

Layouts (statsLayouts): row (default), cards, strip (figures in a ruled band).

TeamSection

The people behind the work, each with a name, role, bio and photo.

Layouts (teamLayouts): grid (default), list. columns ("2", "3" or "4", default "3") applies to grid.

Sections

Sections renders a page from stored data: a list of { id, type, props } items, as a page builder or a CMS saves them. type is one of hero, features, about, stats, gallery, testimonials, team, pricing, faq, logos, cta and contact. A type the package does not have goes to renderCustom, or is left out, so a page saved by a newer editor still renders. resolveHref is passed to every section.

Sections adds no space between sections. Wrap it in a Column with a gap to set the rhythm. sectionComponents maps each type to its component if you render the list yourself.

Schema

sectionSchemas describes every section as plain data: its component name, a label, a one-line description, its layouts (the first is the default), its fields and a filled-in sample. It has no functions, so JSON.stringify(sectionSchemas) gives an editor panel or an agent the full contract. sectionTypes lists the types in the order an editor offers them, and isSectionType(value) checks a stored type.

API reference

Every section takes these props. Lists of items are documented with each section above.

Prop
Type
Default
Sections
layoutstring: one of the section's layoutsthe first layoutall
width"s", "m" or "l": how wide the content runs"l"all
eyebrowstringall
titlestringall
descriptionstringall
resolveHref(href: string) => string: rewrites every link the section rendersall
primaryLabel, primaryHrefstringHero, About, Cta, Contact
secondaryLabel, secondaryHrefstringHero, About, Cta
image, imageAltstringHero, About, Cta (cover)
columns"2", "3" or "4""3"Features, Team
itemsan array of row objects, per section[]Features, Testimonials, Pricing, Faq, Gallery, Logos, Stats, Team

Sections takes items ({ id?, type, props? }[]), resolveHref and renderCustom ((item, index) => ReactNode).

Edit this page on GitHub