Carregando…
Carregando…
Carregando…Dynamic survey with text, textarea, radio, checkbox, scale and rating question types.
$ npx kikitocn add survey-form@/lib/utils@/components/ui/cn/buttonimport { SurveyForm } from "@/components/ui/cn/survey-form/SurveyForm";
export function SurveyFormExample() {
return (
<SurveyForm />
);
}| Prop | Tipo | Padrão | Descrição |
|---|---|---|---|
questions* | SurveyQuestion[] | — | Lista de perguntas: { id, label, type, required?, options?, placeholder? } |
title | string | undefined | Título da pesquisa |
description | string | undefined | Descrição/instrução da pesquisa |
onSubmit | (answers: Record<string, unknown>) => void | undefined | Callback com as respostas ao enviar |
submitLabel | string | 'Enviar respostas' | Texto do botão de envio |
Survey Form — multiple question types