TidalUI

Consent preferences footer preview

Review optional services and save category preferences.

pro · Blocks · section

When to use

Alternatives

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

Installation

npx shadcn@latest add @tidal-pro/footer-consent

Import components/ui/tidal.css, components/ui/footer-consent.css. Wrap installed components in tidal-scope.

Preview

Consent preferences footer component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/footer-consent.css";
import{TidalFooterConsent}from"./components/ui/footer-consent";
export default()=><div className="tidal-scope"><TidalFooterConsent brand={"value"} categories={[{id:"example",label:"Demo"}]} heading={"Demo"} onCategoryChange={() => {}} values={{}}/></div>;

API and props

TidalFooterConsent.brand (required)
ReactNode

Required brand value accepted by this exported component.

TidalFooterConsent.categories (required)
ReadonlyArray<TidalFooterConsentCategory>

Required categories value accepted by this exported component.

TidalFooterConsent.heading (required)
ReactNode

Required heading value accepted by this exported component.

TidalFooterConsent.onCategoryChange (required)
(id: string, checked: boolean) => void

Callback invoked when the category change interaction is proposed.

TidalFooterConsent.values (required)
Readonly<Record<string, boolean>>

Required values value accepted by this exported component.

TidalFooterConsent.description
ReactNode

Optional description value accepted by this exported component.

TidalFooterConsent.error
ReactNode

Optional error value accepted by this exported component.

TidalFooterConsent.formProps
SafeFormProps | undefined

Optional form props value accepted by this exported component.

TidalFooterConsent.formRef
Ref<HTMLFormElement> | undefined

Optional form ref value accepted by this exported component.

TidalFooterConsent.headingLevel
TidalFooterConsentHeadingLevel | undefined

Optional heading level value accepted by this exported component.

TidalFooterConsent.legal
ReactNode

Optional legal value accepted by this exported component.

TidalFooterConsent.onRejectOptional
((event: MouseEvent<HTMLButtonElement>) => void) | undefined

Callback invoked when the reject optional interaction is proposed.

TidalFooterConsent.onReset
FormEventHandler<HTMLFormElement> | undefined

Callback invoked when the reset interaction is proposed.

TidalFooterConsent.onSubmit
FormEventHandler<HTMLFormElement> | undefined

Callback invoked when the submit interaction is proposed.

TidalFooterConsent.policyLabel
ReactNode

Optional policy label value accepted by this exported component.

TidalFooterConsent.policyLinks
ReadonlyArray<TidalFooterConsentLink> | undefined

Optional policy links value accepted by this exported component.

TidalFooterConsent.rejectButtonProps
SafeButtonProps | undefined

Optional reject button props value accepted by this exported component.

TidalFooterConsent.rejectButtonRef
Ref<HTMLButtonElement> | undefined

Optional reject button ref value accepted by this exported component.

TidalFooterConsent.rejectOptionalLabel
ReactNode

Optional reject optional label value accepted by this exported component.

TidalFooterConsent.saveButtonProps
SafeButtonProps | undefined

Optional save button props value accepted by this exported component.

TidalFooterConsent.saveButtonRef
Ref<HTMLButtonElement> | undefined

Optional save button ref value accepted by this exported component.

TidalFooterConsent.saveLabel
ReactNode

Optional save label value accepted by this exported component.

TidalFooterConsent.saveState
TidalFooterConsentState | undefined

Optional save state value accepted by this exported component.

TidalFooterConsent.status
ReactNode

Optional status value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas