kliping.pro
  • Docs
  • Explore
  • Builder
  • Directory
  • Colors
  • Typeset
Saved
Docs
  • Sections13
  • Installation5
  • Dark Mode4
  • Forms3
  • Registry6
  • Utilities2
  • More10
  • Components137
  • Accordion
  • Action Bar
  • AI Chat
  • AI Thread List
  • Alert
  • Alert Dialog
  • Angle Slider
  • Animated Grid Pattern
  • Aspect Ratio
  • Attachment
  • Avatar
  • Avatar Group
  • Badge
  • Badge Overflow
  • Banner
  • Border Beam
  • Breadcrumb
  • Bubble
  • Button
  • Button Group
  • Calendar
  • Card
  • Carousel
  • Chart
  • Checkbox
  • Checkbox Group
  • Chip
  • Circular Progress
  • Client Only
  • Collapsible
  • Color Picker
  • Color Swatch
  • Combobox
  • Combobox Advanced
  • Command
  • Compare Slider
  • Composition
  • Context Menu
  • Cropper
  • Data Grid
  • Data Table
  • Data Table Advanced
  • Date Picker
  • Dialog
  • Direction Provider
  • Dot Pattern
  • Drawer
  • Dropdown Menu
  • Editable
  • Empty
  • Field
  • File Upload
  • Form
  • FPS
  • Gauge
  • Hitbox
  • Hover Card
  • Input
  • Input Group
  • Input OTP
  • Item
  • Kanban
  • Kbd
  • Kbd Advanced
  • Key Value
  • Label
  • List
  • Listbox
  • Logos
  • Map
  • Marker
  • Marquee
  • Mask Input
  • Masonry
  • Media Player
  • Mention
  • Menubar
  • Message
  • Message Scroller
  • Native Select
  • Navigation Menu
  • Number Field
  • Pagination
  • Particles
  • Pending
  • Phone Input
  • Pin Input
  • Popover
  • Portal
  • Presence
  • Progress
  • QR Code
  • Questionnaire
  • Radio Group
  • Range Calendar
  • Rating
  • Relative Time Card
  • Resizable
  • Responsive Dialog
  • Scroll Area
  • Scroll Spy
  • Scroller
  • Segmented Input
  • Select
  • Selection Toolbar
  • Separator
  • Sheet
  • Sidebar
  • Skeleton
  • Slider
  • Software Purchase Card
  • Sonner
  • Sortable
  • Speed Dial
  • Spinner
  • Stack
  • Stat
  • Status
  • Stepper
  • Stepper Advanced
  • Swap
  • Switch
  • Table
  • Tabs
  • Tags Input
  • Tags Input Advanced
  • Textarea
  • Time Picker
  • Timeline
  • Toast
  • Toggle
  • Toggle Group
  • Tooltip
  • Tour
  • Typography
  • Visually Hidden
  • Visually Hidden Input
  1. Docs
  2. Components
  3. Questionnaire

Questionnaire

PreviousNext

Kuesioner bertahap dengan pertanyaan pilihan tunggal, pilihan ganda, isian bebas, dan pertanyaan yang boleh dilewati.

Question 1 of 3
What should the agent build next?

Choose a direction or describe another task.

Choose an answer to continue.

What should every progress update include?

Select all that apply, or skip this question.

Choose an answer or skip this question.

When should work begin?

Choose when the agent should begin the work.

Choose an answer to continue.

Installation ​

pnpm dlx kliping@latest add questionnaire

Salin dan tempel kode sumber di GitHub ke project Anda.

Sesuaikan path import dengan struktur project Anda.

Usage ​

vue
<script setup lang="ts">
import {
  Questionnaire,
  QuestionnaireActions,
  QuestionnaireChoice,
  QuestionnaireChoices,
  QuestionnaireDescription,
  QuestionnaireError,
  QuestionnaireItem,
  QuestionnaireNext,
  QuestionnairePrevious,
  QuestionnaireProgress,
  QuestionnaireSkip,
  QuestionnaireSubmit,
  QuestionnaireTitle,
} from '@/components/ui/questionnaire'

const items = [
  { name: 'direction', required: true },
  { name: 'timing', required: true },
]

function handleSubmit(event: Event) {
  event.preventDefault()

  const answers = new FormData(event.target as HTMLFormElement)
  console.log(Object.fromEntries(answers))
}
</script>

<template>
  <Questionnaire :items="items" @submit="handleSubmit">
    <QuestionnaireProgress />

    <QuestionnaireItem name="direction" required>
      <QuestionnaireTitle>What should the agent build next?</QuestionnaireTitle>
      <QuestionnaireDescription>Choose a direction.</QuestionnaireDescription>
      <QuestionnaireChoices>
        <QuestionnaireChoice value="tool-calls">Tool call timeline</QuestionnaireChoice>
        <QuestionnaireChoice value="approvals">Approval checkpoints</QuestionnaireChoice>
      </QuestionnaireChoices>
      <QuestionnaireError />
    </QuestionnaireItem>

    <QuestionnaireItem name="timing" required>
      <QuestionnaireTitle>When should work begin?</QuestionnaireTitle>
      <QuestionnaireChoices>
        <QuestionnaireChoice value="now">Start now</QuestionnaireChoice>
        <QuestionnaireChoice value="backlog">Add it to the backlog</QuestionnaireChoice>
      </QuestionnaireChoices>
      <QuestionnaireError />
    </QuestionnaireItem>

    <QuestionnaireActions>
      <QuestionnairePrevious />
      <QuestionnaireSkip />
      <QuestionnaireNext />
      <QuestionnaireSubmit />
    </QuestionnaireActions>
  </Questionnaire>
</template>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61

Composition ​

Susunan berikut adalah cara membangun sebuah questionnaire:

text
Questionnaire
├── QuestionnaireProgress
├── QuestionnaireItem
│   ├── QuestionnaireTitle
│   ├── QuestionnaireDescription
│   ├── QuestionnaireChoices
│   │   ├── QuestionnaireChoice
│   │   │   └── QuestionnaireChoiceDescription
│   │   └── QuestionnaireInput
│   └── QuestionnaireError
└── QuestionnaireActions
    ├── QuestionnairePrevious
    ├── QuestionnaireSkip
    ├── QuestionnaireNext
    └── QuestionnaireSubmit

Questionnaire menghasilkan <form> sungguhan, dan tiap itemnya menghasilkan <fieldset> beserta <legend>. Jawabannya terkirim lewat FormData, jadi Anda tidak perlu state tambahan.

Render di Sisi Server ​

Isi prop items supaya item aktif, progres, tombol aksi, dan pintasan jawaban ikut dirender di server. Tanpa itu, questionnaire baru mengetahui urutannya setelah semua item ter-mount di klien.

Features ​

  • Satu pertanyaan dalam satu waktu, dengan progres, navigasi, dan validasi yang sudah ditangani otomatis.
  • Jawaban pilihan tunggal, pilihan ganda, isian bebas, dan pertanyaan yang sengaja dilewati.
  • Pintasan keyboard untuk memilih jawaban, plus navigasi antar pertanyaan dan jawaban lewat tombol panah.
  • Prop items yang deklaratif untuk mengatur urutan, item bersyarat, dan penetapan pintasan yang konsisten.
  • Navigasi yang dikendalikan lewat v-model:item untuk alur validasi buatan sendiri.
  • Reset form bawaan browser mengembalikan jawaban ke nilai yang Anda tandai sebagai bawaan.

Examples ​

Pilihan Ganda ​

Pakai multiple untuk pertanyaan yang menerima lebih dari satu jawaban tetap.

What context should the agent inspect?

Select every source that may affect the implementation.

Choose an answer to continue.

Jawaban Bebas ​

Padukan QuestionnaireInput dengan pilihan tetap kalau pengguna boleh mengisi jawaban lain.

How should the agent approach this refactor?

Choose a strategy or write a more specific instruction.

Choose an answer to continue.

Melewati Pertanyaan ​

Tambahkan QuestionnaireSkip kalau sebuah pertanyaan opsional boleh sengaja dikosongkan.

Question 1 of 3
What kind of change is this?

Choose the category that best describes the work.

Choose an answer to continue.

Are there any implementation constraints?

Answer if needed, or intentionally skip this question.

How should the work be reviewed?

Choose the checks the agent should complete before handoff.

Choose an answer to continue.

Pintasan Keyboard ​

Tetapkan tombol huruf atau angka untuk tiap jawaban lewat shortcuts. Deklarasikan choices pada items supaya tombolnya tetap konsisten berapa pun urutan tampilnya.

What should the agent do next?

Use the displayed shortcut or navigate with the keyboard.

Choose an answer to continue.

Validasi Buatan Sendiri ​

Padukan navigasi terkendali dengan skema eksternal seperti Zod untuk kembali ke pertanyaan yang belum valid dan menampilkan pesan error-nya.

How much detail should the answer include?

Choose the response depth.

1 / 2

Choose an answer to continue.

Who will read the answer?

Public answers require complete context.

1 / 2

Choose an answer to continue.

QuestionnaireError sudah punya pesan bawaan, jadi tampilkan pesan Anda sendiri hanya kalau memang ada:

vue
<QuestionnaireError>
  <template v-if="errors.detail">
    {{ errors.detail }}
  </template>
</QuestionnaireError>
1
2
3
4
5

Dikendalikan dari Luar ​

Kendalikan item aktif dari state induk, misalnya untuk kembali ke langkah yang belum valid. Pakai v-model:item.

Current checkpoint: Change scope

Question 1 of 3
What may the agent change?

The host stores the active checkpoint while Questionnaire navigates.

Choose an answer to continue.

Which verification level should it use?

Choose an answer to continue.

What should the agent return when finished?

Choose an answer to continue.

Melanjutkan Sesi ​

Pulihkan item aktif dan jawaban bawaan yang tersimpan, lalu kembalikan perubahan ke keadaan simpanan itu.

Question 2 of 3
What kind of migration is this?

This answer was saved during the previous session.

Choose an answer to continue.

How should the migration be verified?

These checks were selected during the previous session.

Choose an answer to continue.

Anything else the agent should remember?

This note was saved with the draft.

Pertanyaan Bersyarat ​

Nonaktifkan pertanyaan yang tidak relevan dengan jawaban pengguna sebelumnya.

Question 1 of 2
Where should the agent run?

Cloud runs add an environment question to this flow.

Choose an answer to continue.

Which cloud environment should it use?

Choose an answer to continue.

When should the agent request approval?

Choose an answer to continue.

State Navigasi ​

Baca status tiap item untuk menonaktifkan navigasi dan menyesuaikan style tombol aksi. Dengarkan @update:status pada item yang ingin Anda pantau.

Question 1 of 2
What may the agent modify?

Next is intentionally disabled until an answer is selected.

Choose an answer to continue.

What must pass before completion?

Choose an answer to continue.

Indikator Progres Kustom ​

Pakai state pada slot progres untuk membuat indikator sendiri. QuestionnaireProgress menyediakan current, total, first, dan last.

Checkpoint 1 of 4
How large is the change?

Choose an answer to continue.

How should commits be organized?

Choose an answer to continue.

Which tests should run?

Choose an answer to continue.

How should the work be delivered?

Choose an answer to continue.

Item Beranimasi ​

Animasikan item yang sedang aktif sementara progres dan navigasinya tetap diam. Item aktif ditandai dengan data-active.

Question 1 of 3
What should the agent do?

Choose the task for this run.

Choose an answer to continue.

How should the work be reviewed?

Select the verification depth.

Choose an answer to continue.

How should the result be delivered?

Choose the final handoff format.

Choose an answer to continue.

Card ​

Padukan Questionnaire dengan slot Card tanpa mengorbankan makna judul dan keterangan pertanyaannya. Pakai as-child untuk menampilkan sebuah bagian sebagai komponen lain:

vue
<QuestionnaireTitle as-child>
  <CardTitle>What should the agent work on?</CardTitle>
</QuestionnaireTitle>
1
2
3

What should the agent work on?

Choose the task that should be handled next.

Question 1 of 2

Choose an answer to continue.

What should the final handoff include?

Pick the level of detail needed for review.

Question 1 of 2

Choose an answer to continue.

QuestionnaireProgress, QuestionnaireTitle, QuestionnaireDescription, QuestionnaireChoices, QuestionnaireError, QuestionnaireActions, dan keempat tombol navigasinya sama-sama menerima as dan as-child. Memakai as-child pada judul akan menggantikan legend yang menamai item, sehingga item itu dilabeli oleh judul yang ditampilkan. Judul dan keterangannya tetap mempertahankan id dari anak yang mereka render.

Dialog ​

Padukan Questionnaire di dalam Dialog, sementara urusan membatalkan dan menutupnya tetap dipegang komponen induk.

Navigasi Keyboard ​

KeyDescription
Arrow DownMoves focus to the next answer.
Arrow UpMoves focus to the previous answer.
Arrow RightMoves to the next question once the current one is answered.
Arrow LeftMoves to the previous question.
EnterConfirms the focused answer and moves on, or submits on the last question.
Meta+Enter / Ctrl+EnterConfirms the active question from anywhere in the form.
A – Z / 1 – 9Selects the matching choice when shortcuts is set.

Accessibility ​

QuestionnaireItem menghasilkan fieldset beserta legend, jadi tiap pertanyaan dibacakan bersama jawabannya. Keterangan dan pesan error dikaitkan ke item lewat aria-describedby, dan item yang belum valid menyertakan aria-invalid.

QuestionnaireProgress menghasilkan progressbar bernama yang membacakan pertanyaan saat ini. Item yang tidak aktif diberi hidden dan inert, jadi tidak ikut urutan Tab maupun pohon aksesibilitas.

Tombol navigasinya adalah tombol sungguhan. QuestionnaireSubmit mengirim form, jadi questionnaire tetap bekerja dengan autofill browser dan pengiriman form bawaan.

Requirements ​

Semua dipasang otomatis oleh kliping add; tabel ini untuk Anda yang memasang manual atau memeriksa project.

RequirementValue
ProjectVue 3.5+, Tailwind CSS v4, alias @ — disiapkan kliping init
npm packages@lucide/vue@^1.31.0, reka-ui@^2.10.3
Kliping itemsbutton
Filescomponents/ui/questionnaire/questionnaire.vue
components/ui/questionnaire/questionnaire-actions.vue
components/ui/questionnaire/questionnaire-choice.vue
components/ui/questionnaire/questionnaire-choice-description.vue
components/ui/questionnaire/questionnaire-choices.vue
components/ui/questionnaire/questionnaire-description.vue
components/ui/questionnaire/questionnaire-error.vue
components/ui/questionnaire/questionnaire-input.vue
components/ui/questionnaire/questionnaire-item.vue
components/ui/questionnaire/questionnaire-next.vue
components/ui/questionnaire/questionnaire-previous.vue
components/ui/questionnaire/questionnaire-progress.vue
components/ui/questionnaire/questionnaire-skip.vue
components/ui/questionnaire/questionnaire-submit.vue
components/ui/questionnaire/questionnaire-title.vue
components/ui/questionnaire/index.ts
components/ui/questionnaire/use-questionnaire.ts

Anatomy ​

Susunan bagiannya seperti dipakai di contoh-contoh di atas. Impor semua bagian dari satu tempat, lalu susun begini:

vue
<Questionnaire>
  <QuestionnaireProgress />
  <QuestionnaireItem>
    <QuestionnaireTitle />
    <QuestionnaireDescription />
    <QuestionnaireChoices>
      <QuestionnaireChoice />
      <QuestionnaireInput />
    </QuestionnaireChoices>
    <QuestionnaireError />
    <QuestionnaireProgress />
    <QuestionnaireInput />
  </QuestionnaireItem>
  <QuestionnaireActions>
    <QuestionnairePrevious />
    <QuestionnaireNext />
    <QuestionnaireSubmit />
    <QuestionnaireSkip />
  </QuestionnaireActions>
</Questionnaire>

Bagian lain yang tersedia: QuestionnaireChoiceDescription.

API Reference ​

Questionnaire ​

Form terluar. Mengurus item aktif, progres, validasi, dan navigasi keyboard.

PropTypeDefaultDescription
defaultItem?string—Item shown first. Ignored when item is provided.
item?string—Controlled active item. Use with v-model:item.
items?readonly QuestionnaireItemDefinition[]—Declares the item order, and the choice order shortcuts are assigned in.
noValidate?booleantrueSet to false to run native constraint validation on answered items.
shortcuts?QuestionnaireShortcutMode—Assigns a keyboard shortcut to every choice.
EventPayloadDescription
@reset[event: Event]The form was reset.
@submit[event: Event]The form was submitted.
@update:item[item: string]The open question changed. Bind with v-model:item.
SlotProps
#default{ current: number; first: boolean; last: boolean; total: number; }
Data attributeValue
[data-slot]"questionnaire"
[data-shortcuts]QuestionnaireShortcutMode

QuestionnaireProgress ​

Sebuah progressbar yang membacakan pertanyaan aktif. Menyediakan current, total, first, dan last ke slot bawaannya.

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"div"The element or component this component should render as. Can be overwritten by asChild.
SlotProps
#default{ current: number; first: boolean; last: boolean; total: number; }
Data attributeValue
[data-slot]"questionnaire-progress"
[data-current]set at runtime
[data-first]set at runtime
[data-last]set at runtime
[data-total]set at runtime

QuestionnaireItem ​

Satu pertanyaan, ditampilkan sebagai fieldset. Hanya item yang aktif yang terlihat.

PropTypeDefaultDescription
disabled?booleanfalseExcludes the item from the questionnaire without unmounting it.
invalid?booleanfalseMarks the item invalid from outside, for example after schema validation.
multiple?booleanfalseRenders choices as checkboxes and keeps every selected answer.
namestring—Submitted under this name, and used to activate the item.
required?booleanfalseRequires an answer before the questionnaire can continue.
EventPayloadDescription
@update:status[status: QuestionnaireItemStatus]The question status changed. Bind with v-model:status.
SlotProps
#default{ active: boolean; invalid: boolean; status: QuestionnaireItemStatus; }
Data attributeValue
[data-slot]"questionnaire-item"
[data-active]set at runtime
[data-disabled]boolean
[data-invalid]boolean
[data-multiple]boolean
[data-required]boolean
[data-status]set at runtime

QuestionnaireTitle ​

Teks pertanyaannya, ditampilkan sebagai legend.

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"legend"The element or component this component should render as. Can be overwritten by asChild.
id?string—The id of the rendered element.
SlotProps
#default—
Data attributeValue
[data-slot]"questionnaire-title"

QuestionnaireDescription ​

Teks bantuan yang dikaitkan ke item lewat aria-describedby.

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"p"The element or component this component should render as. Can be overwritten by asChild.
id?string—Overrides the generated id.
SlotProps
#default—
Data attributeValue
[data-slot]"questionnaire-description"

QuestionnaireChoices ​

Daftar jawaban. Membungkus pilihan-pilihan beserta isian bebas kalau ada.

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"div"The element or component this component should render as. Can be overwritten by asChild.
SlotProps
#default{ shortcuts: QuestionnaireShortcutMode | null; }
Data attributeValue
[data-slot]"questionnaire-choices"
[data-shortcuts]set at runtime

QuestionnaireChoice ​

Satu jawaban, ditampilkan sebagai radio atau checkbox tergantung jenis pertanyaannya.

PropTypeDefaultDescription
checked?booleanundefinedControlled checked state. Use with v-model:checked.
defaultChecked?booleanfalseChecks the choice on mount and after a native form reset.
disabled?booleanfalseDisables the choice.
valuestring—Submitted as the answer of the parent item.
EventPayloadDescription
@change[event: Event]Native change event of the input.
@update:checked[checked: boolean]The choice was checked or unchecked. Bind with v-model:checked.
SlotProps
#default{ checked: boolean; disabled: boolean; shortcut: string | null; type: string; }
Data attributeValue
[data-slot]"questionnaire-choice"
[data-checked]boolean
[data-disabled]boolean
[data-invalid]set at runtime
[data-shortcut]set at runtime
[data-type]set at runtime
[data-unchecked]set at runtime

QuestionnaireChoiceDescription ​

Teks tambahan di dalam sebuah pilihan.

SlotProps
#default—
Data attributeValue
[data-slot]"questionnaire-choice-description"

QuestionnaireInput ​

Jawaban bebas. Dianggap menjawab pertanyaan selama isiannya tidak kosong, dan dikirim memakai nama item tersebut.

PropTypeDefaultDescription
defaultValue?string | number—Fills the answer on mount and after a native form reset.
disabled?booleanfalseDisables the input.
modelValue?string | number—Controlled value. Use with v-model.
type?QuestionnaireInputType"text"The input type.
EventPayloadDescription
@update:modelValue[value: string]Emitted when the value changes.
Data attributeValue
[data-slot]"questionnaire-input-wrapper"
[data-disabled]boolean
[data-empty]set at runtime
[data-filled]set at runtime
[data-invalid]set at runtime

QuestionnaireError ​

Pesan error item. Tersembunyi sampai item itu dinyatakan tidak valid, dan memakai pesan bawaan kalau Anda tidak menyediakannya.

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"p"The element or component this component should render as. Can be overwritten by asChild.
id?string—Overrides the generated id.
SlotProps
#default{ invalid: boolean; }
Data attributeValue
[data-slot]"questionnaire-error"
[data-invalid]set at runtime

QuestionnaireActions ​

Baris tombol navigasi.

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"div"The element or component this component should render as. Can be overwritten by asChild.
SlotProps
#default—
Data attributeValue
[data-slot]"questionnaire-actions"

QuestionnairePrevious, QuestionnaireSkip, QuestionnaireNext, dan QuestionnaireSubmit ​

Tombol-tombol navigasi. Masing-masing menyembunyikan diri saat tidak relevan: QuestionnairePrevious di item pertama, QuestionnaireSkip di item wajib, QuestionnaireNext di item terakhir, dan QuestionnaireSubmit di semua item selain yang terakhir.

QuestionnaireNext ​

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"button"The element or component this component should render as. Can be overwritten by asChild.
disabled?booleanfalsePrevents the user from interacting with it.
size?"default" | "sm" | "xs" | "icon-xs" | "lg" | "icon" | "icon-sm" | "icon-lg""default"The visual size.
variant?"default" | "destructive" | "ghost" | "outline" | "secondary" | "link""default"The visual style.
EventPayloadDescription
@click[event: MouseEvent]The button was clicked, before moving to the next question.
SlotProps
#default—
Data attributeValue
[data-slot]"questionnaire-next"
[data-disabled]boolean
[data-hidden]set at runtime
[data-shortcut]set at runtime
[data-size]"default" | "sm" | "xs" | "icon-xs" | "lg" | "icon" | "icon-sm" | "icon-lg"
[data-status]set at runtime
[data-variant]"default" | "destructive" | "ghost" | "outline" | "secondary" | "link"
[data-visible]set at runtime

QuestionnairePrevious ​

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"button"The element or component this component should render as. Can be overwritten by asChild.
disabled?booleanfalsePrevents the user from interacting with it.
size?"default" | "sm" | "xs" | "icon-xs" | "lg" | "icon" | "icon-sm" | "icon-lg""default"The visual size.
variant?"default" | "destructive" | "ghost" | "outline" | "secondary" | "link""outline"The visual style.
EventPayloadDescription
@click[event: MouseEvent]The button was clicked, before moving to the previous question.
SlotProps
#default—
Data attributeValue
[data-slot]"questionnaire-previous"
[data-disabled]boolean
[data-hidden]set at runtime
[data-size]"default" | "sm" | "xs" | "icon-xs" | "lg" | "icon" | "icon-sm" | "icon-lg"
[data-status]set at runtime
[data-variant]"default" | "destructive" | "ghost" | "outline" | "secondary" | "link"
[data-visible]set at runtime

QuestionnaireSkip ​

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"button"The element or component this component should render as. Can be overwritten by asChild.
disabled?booleanfalsePrevents the user from interacting with it.
size?"default" | "sm" | "xs" | "icon-xs" | "lg" | "icon" | "icon-sm" | "icon-lg""default"The visual size.
variant?"default" | "destructive" | "ghost" | "outline" | "secondary" | "link""outline"The visual style.
EventPayloadDescription
@click[event: MouseEvent]The button was clicked, before skipping the question.
SlotProps
#default—
Data attributeValue
[data-slot]"questionnaire-skip"
[data-disabled]boolean
[data-hidden]set at runtime
[data-size]"default" | "sm" | "xs" | "icon-xs" | "lg" | "icon" | "icon-sm" | "icon-lg"
[data-status]set at runtime
[data-variant]"default" | "destructive" | "ghost" | "outline" | "secondary" | "link"
[data-visible]set at runtime

QuestionnaireSubmit ​

PropTypeDefaultDescription
asChild?boolean—Change the default rendered element for the one passed as a child, merging their props and behavior. Read our Composition guide for more details.
as?AsTag | Component"button"The element or component this component should render as. Can be overwritten by asChild.
disabled?booleanfalsePrevents the user from interacting with it.
size?"default" | "sm" | "xs" | "icon-xs" | "lg" | "icon" | "icon-sm" | "icon-lg""default"The visual size.
variant?"default" | "destructive" | "ghost" | "outline" | "secondary" | "link""default"The visual style.
SlotProps
#default—
Data attributeValue
[data-slot]"questionnaire-submit"
[data-disabled]boolean
[data-hidden]set at runtime
[data-shortcut]set at runtime
[data-size]"default" | "sm" | "xs" | "icon-xs" | "lg" | "icon" | "icon-sm" | "icon-lg"
[data-status]set at runtime
[data-variant]"default" | "destructive" | "ghost" | "outline" | "secondary" | "link"
[data-visible]set at runtime

CSS Variables ​

Token tema yang dibaca komponen ini — ubah nilainya di CSS global (:root dan .dark, lihat Theming) untuk mengubah tampilannya tanpa menyentuh komponennya: --background, --border, --destructive, --input, --muted, --muted-foreground, --primary, --primary-foreground, --radius, --ring.

PreviousQR CodeNext Radio Group

On This Page

InstallationUsageCompositionRender di Sisi ServerFeaturesExamplesPilihan GandaJawaban BebasMelewati PertanyaanPintasan KeyboardValidasi Buatan SendiriDikendalikan dari LuarMelanjutkan SesiPertanyaan BersyaratState NavigasiIndikator Progres KustomItem BeranimasiCardDialogNavigasi KeyboardAccessibilityRequirementsAnatomyAPI ReferenceQuestionnaireQuestionnaireProgressQuestionnaireItemQuestionnaireTitleQuestionnaireDescriptionQuestionnaireChoicesQuestionnaireChoiceQuestionnaireChoiceDescriptionQuestionnaireInputQuestionnaireErrorQuestionnaireActionsQuestionnairePrevious, QuestionnaireSkip, QuestionnaireNext, dan QuestionnaireSubmitQuestionnaireNextQuestionnairePreviousQuestionnaireSkipQuestionnaireSubmitCSS Variables

© 2026 Kliping. Free components are open source under the MIT License.

LicenseCreditsRoadmap