TidalUI

Response feedback preview

Collect response-specific ratings, reasons and optional comments through a native form.

pro · Feedback · composite

When to use

Alternatives

Configure components.json and the @tidal-pro namespace before installing Pro components.

Installation

npx shadcn@latest add @tidal-pro/response-feedback

Import components/ui/tidal.css, components/ui/response-feedback.css. Wrap installed components in tidal-scope.

Preview

Response feedback component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/response-feedback.css";
import{TidalResponseFeedback}from"./components/ui/response-feedback";
export default(p:Parameters<typeof TidalResponseFeedback>[0])=><div className="tidal-scope"><TidalResponseFeedback {...p}/></div>;

API and props

TidalResponseFeedback.choice (required)
TidalFeedbackChoice | null

Required choice value accepted by this exported component.

TidalResponseFeedback.comment (required)
string

Required comment value accepted by this exported component.

TidalResponseFeedback.onChoiceChange (required)
(choice: TidalFeedbackChoice, event: MouseEvent<HTMLButtonElement>) => void

Callback invoked when the choice change interaction is proposed.

TidalResponseFeedback.onCommentChange (required)
(comment: string) => void

Callback invoked when the comment change interaction is proposed.

TidalResponseFeedback.onReasonsChange (required)
(reasons: readonly string[]) => void

Callback invoked when the reasons change interaction is proposed.

TidalResponseFeedback.reasons (required)
ReadonlyArray<TidalFeedbackReason>

Required reasons value accepted by this exported component.

TidalResponseFeedback.selectedReasons (required)
ReadonlyArray<string>

Required selected reasons value accepted by this exported component.

TidalResponseFeedback.choiceProps
((choice: TidalFeedbackChoice) => ButtonProps) | undefined

Optional choice props value accepted by this exported component.

TidalResponseFeedback.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalResponseFeedback.error
ReactNode

Optional error value accepted by this exported component.

TidalResponseFeedback.labels
Partial<{ helpful: string; unhelpful: string; reasons: string; comment: string; submit: string; pending: string; invalid: string; helpfulHint: string; unhelpfulHint: string; }> | undefined

Optional labels value accepted by this exported component.

TidalResponseFeedback.onSubmit
((event: FormEvent<HTMLFormElement>) => void) | undefined

Callback invoked when the submit interaction is proposed.

TidalResponseFeedback.pending
boolean | undefined

Optional pending value accepted by this exported component.

TidalResponseFeedback.submitProps
ButtonProps | undefined

Optional submit props value accepted by this exported component.

TidalResponseFeedback.success
ReactNode

Optional success value accepted by this exported component.

TidalResponseFeedback.textareaProps
Omit<Omit<DetailedHTMLProps<TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>, "ref">, "disabled" | "form" | "name" | "value" | "defaultValue" | "id" | "role" | "aria-disabled" | "aria-label" | "aria-labelledby" | "aria-readonly" | "children" | "dangerouslySetInnerHTML" | "onChange" | "onInput"> | undefined

Optional textarea props value accepted by this exported component.

TidalResponseFeedback.textareaRef
Ref<HTMLTextAreaElement> | undefined

Optional textarea ref value accepted by this exported component.

TidalResponseFeedback.title
ReactNode

Optional title value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas