TidalUI

Cancellation flow preview

Guide a consumer-owned keep, pause, or cancellation choice through reason, consequence, retained-access review, and native confirmation.

pro · Blocks · composite

When to use

Alternatives

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

Installation

npx shadcn@latest add @tidal-pro/subscription-cancel

Import components/ui/tidal.css, components/ui/subscription-cancel.css. Wrap installed components in tidal-scope.

Preview

Cancellation flow component preview

Open interactive preview

Minimal example

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

API and props

TidalSubscriptionCancel.choices (required)
ReadonlyArray<TidalCancellationChoice>

Required choices value accepted by this exported component.

TidalSubscriptionCancel.onChoiceChange (required)
(choiceId: string, event: ChangeEvent<HTMLInputElement>) => void

Callback invoked when the choice change interaction is proposed.

TidalSubscriptionCancel.onConfirmedChange (required)
(confirmed: boolean, event: ChangeEvent<HTMLInputElement>) => void

Callback invoked when the confirmed change interaction is proposed.

TidalSubscriptionCancel.onNoteChange (required)
(note: string, event: ChangeEvent<HTMLTextAreaElement>) => void

Callback invoked when the note change interaction is proposed.

TidalSubscriptionCancel.onReasonChange (required)
(reasonId: string, event: ChangeEvent<HTMLInputElement>) => void

Callback invoked when the reason change interaction is proposed.

TidalSubscriptionCancel.onStepChange (required)
(step: TidalCancellationStep, event: MouseEvent<HTMLButtonElement>) => void

Callback invoked when the step change interaction is proposed.

TidalSubscriptionCancel.reasons (required)
ReadonlyArray<TidalCancellationReason>

Required reasons value accepted by this exported component.

TidalSubscriptionCancel.retainedAccessDate (required)
string

Required retained access date value accepted by this exported component.

TidalSubscriptionCancel.subscriptionLabel (required)
ReactNode

Required subscription label value accepted by this exported component.

TidalSubscriptionCancel.title (required)
ReactNode

Required title value accepted by this exported component.

TidalSubscriptionCancel.value (required)
TidalCancellationValue

Required value value accepted by this exported component.

TidalSubscriptionCancel.backButtonProps
OwnedButtonProps | undefined

Optional back button props value accepted by this exported component.

TidalSubscriptionCancel.backButtonRef
Ref<HTMLButtonElement> | undefined

Optional back button ref value accepted by this exported component.

TidalSubscriptionCancel.choiceInputProps
OwnedRadioProps | undefined

Optional choice input props value accepted by this exported component.

TidalSubscriptionCancel.completion
ReactNode

Optional completion value accepted by this exported component.

TidalSubscriptionCancel.confirmationInputProps
OwnedRadioProps | undefined

Optional confirmation input props value accepted by this exported component.

TidalSubscriptionCancel.continueButtonProps
OwnedButtonProps | undefined

Optional continue button props value accepted by this exported component.

TidalSubscriptionCancel.continueButtonRef
Ref<HTMLButtonElement> | undefined

Optional continue button ref value accepted by this exported component.

TidalSubscriptionCancel.description
ReactNode

Optional description value accepted by this exported component.

TidalSubscriptionCancel.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalSubscriptionCancel.error
ReactNode

Optional error value accepted by this exported component.

TidalSubscriptionCancel.formProps
Omit<FormHTMLAttributes<HTMLFormElement>, "aria-disabled" | "children" | "dangerouslySetInnerHTML"> | undefined

Optional form props value accepted by this exported component.

TidalSubscriptionCancel.formRef
Ref<HTMLFormElement> | undefined

Optional form ref value accepted by this exported component.

TidalSubscriptionCancel.headingLevel
"h2" | "h3" | "h4" | "h5" | undefined

Optional heading level value accepted by this exported component.

TidalSubscriptionCancel.labels
Partial<{ progress: string; reasonStep: string; choiceStep: string; confirmStep: string; completeStep: string; reasonLegend: string; note: string; noteOptional: string; choiceLegend: string; accessUntil: string; consequence: string; confirmation: string; confirmationRequired: string; back: string; continue: string; submit: string; submitting: string; done: string; invalid: string; }> | undefined

Optional labels value accepted by this exported component.

TidalSubscriptionCancel.noteProps
OwnedTextareaProps | undefined

Optional note props value accepted by this exported component.

TidalSubscriptionCancel.noteRef
Ref<HTMLTextAreaElement> | undefined

Optional note ref value accepted by this exported component.

TidalSubscriptionCancel.onConfirm
((event: FormEvent<HTMLFormElement>) => void) | undefined

Callback invoked when the confirm interaction is proposed.

TidalSubscriptionCancel.pending
boolean | undefined

Optional pending value accepted by this exported component.

TidalSubscriptionCancel.reasonInputProps
OwnedRadioProps | undefined

Optional reason input props value accepted by this exported component.

TidalSubscriptionCancel.retainedAccessDisplay
ReactNode

Optional retained access display value accepted by this exported component.

TidalSubscriptionCancel.submitButtonProps
OwnedButtonProps | undefined

Optional submit button props value accepted by this exported component.

TidalSubscriptionCancel.submitButtonRef
Ref<HTMLButtonElement> | undefined

Optional submit button ref value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas