Skip to Content
BlocksApplication & marketing

Application and marketing blocks

These nine existing blocks are now exported, including their prop and data types, through @raydenui/ui/blocks.

BlockMain inputsInteractive Storybook group
HeaderBlockvariant, links, actions, switcherBlocks / Header
CreateAccountBlockForm values, field errors, submission callbackBlocks / CreateAccount
KpiOverviewBlockperiod, metrics, optional period selectionBlocks / KpiOverview
ProfileSettingsBlockProfile values, timezone options, save callbackBlocks / ProfileSettings
TaskListBlockTasks, assignees, completion and filtering callbacksBlocks / TaskList
ProductHeroBlockHeading, copy, media, link or action CTAsBlocks / ProductHero
FeatureOverviewBlockFeature items and optional CTAsBlocks / FeatureOverview
PricingPlansBlockPlans, billing period, limits, availabilityBlocks / PricingPlans
SiteFooterBlockBrand, grouped links, social links, locale controlBlocks / SiteFooter

Header selection

Set active: true on the current navigation link to show its selected state and expose aria-current="page". Action items accept href for navigation or onClick for application behavior. The mobile menu preserves both and closes after an action is selected.

<HeaderBlock variant={2} logo={<a href="/">Rayden</a>} links={[ { label: "Overview", href: "/overview", active: true }, { label: "Resources", href: "/resources" }, ]} actions={[ { label: "Log in", href: "/login", variant: "text" }, { label: "Get started", href: "/signup", variant: "primary" }, ]} />

Header rows share a maximum width of 1440px and collapse according to their container width. Centered-logo variants reserve equal space on both sides of the logo; the mobile menu takes over when that balanced layout no longer fits.

Use defaultActiveIndex for an uncontrolled switcher. For controlled selection, provide both activeIndex and onChange; the selected item remains the value supplied by your application.

import { useState } from "react"; import { HeaderBlock } from "@raydenui/ui/blocks"; function WorkspaceHeader() { const [activeIndex, setActiveIndex] = useState(0); return ( <HeaderBlock variant={10} logo={<span>Acme</span>} switcher={{ tabs: ["Personal", "Team"], activeIndex, onChange: setActiveIndex }} links={[{ label: "Overview", href: "/overview" }]} /> ); }

KPI overview without chart dependencies

Sparklines use SVG and include a visually hidden data table. Importing blocks does not require chart.js or react-chartjs-2. The separate @raydenui/ui/chart entry remains available for richer charts.

import { KpiOverviewBlock } from "@raydenui/ui/blocks"; <KpiOverviewBlock headingLevel="h2" period={{ label: "September 2026", comparisonLabel: "August 2026" }} metrics={[{ id: "orders", label: "Orders", value: "1,240", comparisonValue: "1,100", change: { label: "+12.7%", direction: "up", sentiment: "positive" }, trend: { labels: ["Week 1", "Week 2", "Week 3", "Week 4"], values: [240, 290, 330, 380] }, }]} />

Preview and theming

Run Storybook with pnpm storybook. The Application surface and Marketing Landing composition stories show these blocks together. Use the theme toolbar to switch light and dark modes. Blocks use Rayden’s semantic CSS variables and accept className; choose heading levels to fit the containing page.

Forms and destructive or transactional actions remain owned by the application. Connect callbacks to your validation and services, then supply pending, error, and success states from the actual result.

Last updated on