Skip to main content

Layout Components

Components for structuring your app pages.

Page

The top-level wrapper for app pages. Provides a consistent page structure with title, subtitle, and actions.

import { Page, Button } from "@qumra/manara";

function ProductsPage() {
return (
<Page
title="Products"
subtitle="Manage your store products"
primaryAction={<Button variant="primary">Add Product</Button>}
>
{/* Page content */}
</Page>
);
}

Props

PropTypeDescription
titlestringPage title displayed at the top.
subtitlestringOptional subtitle below the title.
primaryActionReactNodePrimary action button in the header.
secondaryActionsReactNodeSecondary action buttons.
childrenReactNodePage content.

Layout

A section-based layout component for creating multi-column pages.

import { Layout, Card, Text } from "@qumra/manara";

function SettingsPage() {
return (
<Layout>
<Layout.Section>
<Card>
<Text variant="headingMd">General Settings</Text>
{/* Main content - takes more space */}
</Card>
</Layout.Section>

<Layout.Section secondary>
<Card>
<Text variant="headingMd">Summary</Text>
{/* Sidebar content - smaller width */}
</Card>
</Layout.Section>
</Layout>
);
}

Layout.Section Props

PropTypeDefaultDescription
secondarybooleanfalseRender as a narrower sidebar section.
childrenReactNode--Section content.

Card

A container component for grouping related content.

import { Card, Text, Button } from "@qumra/manara";

// Basic card
<Card>
<Text>Card content</Text>
</Card>

// Card with title
<Card title="Order Details">
<Text>Order #1234 was placed on Jan 15.</Text>
</Card>

// Card with sections
<Card title="Product Info">
<Card.Section>
<Text>Section 1 content</Text>
</Card.Section>
<Card.Section>
<Text>Section 2 content</Text>
</Card.Section>
</Card>

Props

PropTypeDescription
titlestringOptional card header title.
childrenReactNodeCard content.

Box

A generic container with padding and spacing control.

import { Box, Text } from "@qumra/manara";

<Box padding="md" background="surface">
<Text>Padded content with background</Text>
</Box>

Props

PropTypeDescription
padding"xs" | "sm" | "md" | "lg" | "xl"Inner padding.
backgroundstringBackground color token.
childrenReactNodeBox content.

InlineStack

Arrange items horizontally with consistent spacing.

import { InlineStack, Button } from "@qumra/manara";

<InlineStack gap="sm">
<Button variant="primary">Save</Button>
<Button>Cancel</Button>
</InlineStack>

<InlineStack gap="md" align="center">
<Text>Label</Text>
<Badge>Active</Badge>
</InlineStack>

Props

PropTypeDefaultDescription
gap"xs" | "sm" | "md" | "lg" | "xl""md"Space between items.
align"start" | "center" | "end""start"Vertical alignment.
wrapbooleantrueWhether items wrap to next line.
childrenReactNode--Stack items.

BlockStack

Arrange items vertically with consistent spacing.

import { BlockStack, Text, TextField } from "@qumra/manara";

<BlockStack gap="md">
<Text variant="headingMd">Contact Information</Text>
<TextField label="Name" />
<TextField label="Email" type="email" />
<TextField label="Phone" type="tel" />
</BlockStack>

Props

PropTypeDefaultDescription
gap"xs" | "sm" | "md" | "lg" | "xl""md"Space between items.
align"start" | "center" | "end""start"Horizontal alignment.
childrenReactNode--Stack items.