Forms
ChoiceCardGroup
Large choices with descriptions. Native inputs: they post with the form before JavaScript loads.
import { ChoiceCardGroup } from "@percentsa/ui";Examples
Code
export function ChoiceCardsExample() {
const t = useT();
return (
<Fieldset legend={t("How do you want to work?", "كيف تريد أن نعمل؟")} className="w-full">
<ChoiceCardGroup
type="radio"
name="engagement"
clearable
defaultValue={["project"]}
options={[
{ value: "project", label: t("Project", "مشروع"), description: t("Fixed scope, fixed price", "نطاق ثابت وسعر ثابت") },
{ value: "team", label: t("Team", "فريق"), description: t("Monthly, flexible scope", "شهري ونطاق مرن") },
{ value: "support", label: t("Support", "دعم"), description: t("Run and improve", "تشغيل وتحسين") },
]}
/>
</Fieldset>
);
}