Coming soon
Variants, states, accessibility notes and RTL behavior for Badge will be documented here when the component lands in @thanawi/ui.
A short status label, such as Verified, Pending or Failed.
import { Badge } from "@thanawi/ui";
import { Bilingual, type ExampleProps } from "./_bilingual";
const copy = {
en: { completed: "Completed", pending: "Pending", failed: "Failed", verified: "Verified", count: "3" },
ar: { completed: "مكتملة", pending: "معلّقة", failed: "فشلت", verified: "موثّقة", count: "3" },
} as const;
export default function BadgeDemo({ locale }: ExampleProps) {
return (
<Bilingual locale={locale} copy={copy} className="flex flex-col gap-4">
{(t) => (
<div className="flex flex-wrap items-center gap-2">
<Badge variant="positive" dot>
{t.completed}
</Badge>
<Badge variant="warning" dot>
{t.pending}
</Badge>
<Badge variant="negative" dot>
{t.failed}
</Badge>
<Badge variant="primary">{t.verified}</Badge>
<Badge variant="primary" appearance="solid" size="sm">
{t.count}
</Badge>
</div>
)}
</Bilingual>
);
}pnpm add @thanawi/uiimport { Badge } from '@thanawi/ui';<Badge>Verified</Badge>Coming soon
Variants, states, accessibility notes and RTL behavior for Badge will be documented here when the component lands in @thanawi/ui.