انتقل إلى المحتوى الرئيسي

UI Components (@qumra/manara)

Manara is the official design system and component library for Qumra apps. It provides ready-to-use React components that match the Qumra Admin panel look and feel.

Installation

npm install @qumra/manara

Setup

Import the stylesheet in your root layout:

app/root.tsx
import "@qumra/manara/styles.css";

Quick Example

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

function Dashboard() {
return (
<Page title="Dashboard">
<Card>
<Text variant="headingMd">Welcome to your app</Text>
<Text>Manage your store settings and products from here.</Text>
<InlineStack gap="sm">
<Button variant="primary">Get Started</Button>
<Button>Learn More</Button>
</InlineStack>
</Card>
</Page>
);
}

Component Categories

Layout

Components for structuring your page layout.

ComponentDescription
PageTop-level page wrapper with title and actions.
LayoutSection-based layout with primary and secondary columns.
CardContent container with optional title and sections.
BoxGeneric container with spacing and padding control.
InlineStackHorizontal stack with configurable gap.
BlockStackVertical stack with configurable gap.

Forms

Components for user input and actions.

ComponentDescription
ButtonAction button with variants, tones, and loading state.
TextFieldText input with label, help text, and validation.
SelectDropdown select input.

Display

Components for presenting data and feedback.

ComponentDescription
TextTypography component with variants and tones.
BadgeSmall status indicator label.
BannerProminent message banner with tone.
SpinnerLoading spinner indicator.
DataTableTable for displaying structured data.
ModalDialog overlay for focused content.
ToastBrief notification message.

Design Tokens

Manara exports design tokens for consistent styling:

import { colors, spacing, fontFamily, fontSize, fontWeight } from "@qumra/manara";
TokenExamples
colorscolors.primary, colors.text, colors.surface, colors.border, colors.critical, colors.success
spacingspacing.xs, spacing.sm, spacing.md, spacing.lg, spacing.xl
fontFamilyDefault font family
fontSizeSize scale
fontWeightWeight scale

Utilities

import { createStyles, classNames } from "@qumra/manara";

// Combine CSS class names conditionally
const classes = classNames("base", isActive && "active", hasError && "error");

Next Steps