FeaturesSection
Explain product capabilities using responsive feature layouts, optional media, and accessible tabs or accordions.
FeaturesSection renders product capabilities from consumer-provided items. Each feature has a stable id and title, with optional description, icon, media, action, nested content, and featured emphasis.
Beta API maturity: Beta.
Installation
import { FeaturesSection, type FeatureItem } from "@puzzle-ui/pieces";Variant previews
The tabs and accordion variants reuse the corresponding accessible UI primitives. Tabs are keyboard-operable; accordion expansion follows the UI Accordion behavior.
grid - A familiar, balanced set of feature summaries.
bento - A varied grid with selected features emphasized.
alternating - A sequence with staggered visual rhythm.
split - A two-column feature collection with room for media.
cards - Separate feature cards for a card-based page.
icons - Short benefits led by consumer-provided icons.
numbered - An ordered set of key capabilities.
tabs - A detailed feature showcase with keyboard-operable tabs.
accordion - A space-efficient expandable feature list.
sticky - A media-led showcase beside scrolling feature content.
horizontal - A row of concise feature summaries.
vertical - A single-column list for narrow or editorial pages.
media-grid - Feature cards where each item includes media.
asymmetric - A grid with varied item widths.
editorial - Longer feature descriptions with an editorial feel.
compact - A dense collection for constrained layouts.
full-width - A broad collection that uses available section width.
API
| Prop | Type | Description |
|---|---|---|
variant | FeaturesVariant | Selects one of the seventeen feature layouts; defaults to grid. |
items | readonly FeatureItem[] | Feature data with stable id, required title, and optional presentation slots. |
FeatureItem.icon | ReactNode | Consumer-provided icon node. |
FeatureItem.media | ReactNode | Optional image, video, or other media. |
FeatureItem.content | ReactNode | Additional item content. |
FeatureItem.action | ReactNode | Optional consumer-provided action. |
FeatureItem.featured | boolean | Emphasizes an item in layouts that support it. |
| Shared section props | SectionRootProps and heading props | Semantic root, theme, native attributes, heading, actions, and children. |
Usage
<FeaturesSection
variant="tabs"
title="Built for focused teams"
items={[
{
id: "automation",
title: "Automate routine work",
description: "Spend more time on important decisions.",
media: <img src="/automation.png" alt="Automation settings" />,
},
{ id: "insights", title: "Understand progress" },
]}
/>An empty collection omits its list or interactive control. The tabs composition uses item IDs as tab IDs; keep IDs stable and unique. Media must have suitable alternatives when it conveys information.
Accessibility
Interactive tabs and accordions use UI keyboard and ARIA behavior. Keep the shared section heading at an appropriate page level, and ensure the item title hierarchy remains meaningful. Decorative icons should be hidden from assistive technology by their consumer-provided markup.