Skip to content
العربية
Navigation

Steps

Progress through a flow.

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

Examples

  1. Details
  2. 2PaymentCard or bank transferStep 2 of 3
  3. 3Done
Code
export function StepsExample() {
  const t = useT();
  const [step, setStep] = useState(1);
  return (
    <Stack gap={6} className="w-full max-w-xl">
      <Steps
        current={step}
        items={[
          { label: t("Details", "التفاصيل") },
          { label: t("Payment", "الدفع"), description: t("Card or bank transfer", "بطاقة أو تحويل") },
          { label: t("Done", "تم") },
        ]}
      />
      <Button variant="secondary" size="sm" onClick={() => setStep((step + 1) % 3)}>
        {t("Next step", "الخطوة التالية")}
      </Button>
    </Stack>
  );
}