Skip to content
العربية
Layout

DetailLayout

A record page: the main column (lines, history) and a side column (customer, totals) at 2:1 from 768 px, and one column on phones with the main column first. A wide table scrolls inside its column and never makes the page wider. sideLabel names the side column for screen readers.

import { DetailLayout } from "@percentsa/ui";

Examples

Main: lines, history
Notes
Code
export function DetailLayoutExample() {
  const t = useT();
  return (
    <DetailLayout
      className="w-full"
      main={
        <Stack gap={3}>
          <Box className="h-32">{t("Main: lines, history", "الرئيسي: البنود، السجل")}</Box>
          <Box>{t("Notes", "ملاحظات")}</Box>
        </Stack>
      }
      side={
        <Stack gap={3}>
          <Box>{t("Customer", "العميل")}</Box>
          <Box className="h-20">{t("Totals", "الإجماليات")}</Box>
        </Stack>
      }
      sideLabel={t("Order details", "تفاصيل الطلب")}
    />
  );
}