Skip to main content

Display Components

Components for presenting data, feedback, and status information.

Text

Typography component with variant and tone support.

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

<Text variant="headingLg">Page Title</Text>
<Text variant="headingMd">Section Title</Text>
<Text variant="headingSm">Subsection Title</Text>
<Text variant="bodyMd">Regular body text</Text>
<Text variant="bodySm">Small body text</Text>

// With tones
<Text tone="critical">Error message</Text>
<Text tone="success">Success message</Text>
<Text tone="subdued">Secondary text</Text>

// Alignment
<Text align="center">Centered text</Text>

Props

PropTypeDefaultDescription
variant"headingLg" | "headingMd" | "headingSm" | "bodyMd" | "bodySm""bodyMd"Typography variant.
tone"default" | "subdued" | "critical" | "success""default"Color tone.
align"start" | "center" | "end""start"Text alignment.
childrenReactNode--Text content.

Badge

A small label for indicating status.

import { Badge } from "@qumra/manara";

<Badge>Default</Badge>
<Badge tone="success">Active</Badge>
<Badge tone="critical">Error</Badge>
<Badge tone="warning">Pending</Badge>
<Badge tone="info">Draft</Badge>

Props

PropTypeDefaultDescription
tone"default" | "success" | "critical" | "warning" | "info""default"Color tone.
childrenReactNode--Badge label.

A prominent message banner for important information, warnings, or errors.

import { Banner } from "@qumra/manara";

<Banner title="Store is live" tone="success">
Your store is now visible to customers.
</Banner>

<Banner title="Action required" tone="warning">
Please complete your payment setup before publishing.
</Banner>

<Banner title="Error" tone="critical">
Failed to sync products. Please try again.
</Banner>

<Banner title="Tip" tone="info">
You can customize your theme from the Theme Editor.
</Banner>

Props

PropTypeDefaultDescription
titlestring--Banner title.
tone"info" | "success" | "warning" | "critical""info"Color tone.
onDismiss() => void--Callback to dismiss the banner.
childrenReactNode--Banner body content.

Spinner

A loading indicator.

import { Spinner } from "@qumra/manara";

<Spinner />
<Spinner size="large" />

Props

PropTypeDefaultDescription
size"small" | "large""small"Spinner size.

DataTable

Display structured data in a table format.

import { DataTable } from "@qumra/manara";

function OrdersList() {
return (
<DataTable
headings={["Order", "Customer", "Total", "Status"]}
rows={[
["#1001", "Ahmed Ali", "SAR 250.00", "Fulfilled"],
["#1002", "Sara Hassan", "SAR 180.00", "Pending"],
["#1003", "Omar Khalid", "SAR 320.00", "Fulfilled"],
]}
/>
);
}

Props

PropTypeDescription
headingsstring[]Column header labels.
rows(string | ReactNode)[][]Table row data. Each row is an array of cell values.
footerContentReactNodeOptional footer content below the table.

A dialog overlay for focused content or confirmations.

import { Modal, Button, Text } from "@qumra/manara";
import { useState } from "react";

function DeleteConfirmation() {
const [open, setOpen] = useState(false);

return (
<>
<Button tone="critical" onClick={() => setOpen(true)}>
Delete Product
</Button>

<Modal
open={open}
onClose={() => setOpen(false)}
title="Delete product?"
primaryAction={{
label: "Delete",
destructive: true,
onAction: () => {
// Delete logic
setOpen(false);
},
}}
secondaryAction={{
label: "Cancel",
onAction: () => setOpen(false),
}}
>
<Text>This will permanently delete the product. This action cannot be undone.</Text>
</Modal>
</>
);
}

Props

PropTypeDescription
openbooleanWhether the modal is visible.
onClose() => voidCallback when the modal is closed.
titlestringModal title.
primaryAction{ label, onAction, destructive?, loading? }Primary action button.
secondaryAction{ label, onAction }Secondary action button.
childrenReactNodeModal body content.

Toast

A brief notification message. For use outside the App Bridge context (standalone rendering).

import { Toast } from "@qumra/manara";
import { useState } from "react";

function MyPage() {
const [showToast, setShowToast] = useState(false);

return (
<>
<button onClick={() => setShowToast(true)}>Show Toast</button>
{showToast && (
<Toast
message="Product saved successfully"
onDismiss={() => setShowToast(false)}
/>
)}
</>
);
}

Props

PropTypeDescription
messagestringToast message text.
isErrorbooleanShow as error toast.
durationnumberAuto-dismiss duration in ms. Default: 3000.
onDismiss() => voidCallback when dismissed.
tip

When your app runs inside the Qumra Admin iframe, prefer using useToast() from @qumra/jisr instead. It displays toasts in the admin panel's native toast system.