TidalUI

Approval request preview

Review a proposed action, confirm its scope and approve or reject it.

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/approval-request

Import components/ui/tidal.css, components/ui/approval-request.css. Wrap installed components in tidal-scope.

Preview

Approval request component preview

Open interactive preview

Minimal example

import"./components/ui/tidal.css";
import"./components/ui/approval-request.css";
import{TidalApprovalRequest}from"./components/ui/approval-request";
export default()=><div className="tidal-scope"><TidalApprovalRequest onApprove={() => {}} onReject={() => {}} title={"Demo"}/></div>;

API and props

TidalApprovalRequest.onApprove (required)
(event: MouseEvent<HTMLButtonElement>) => void

Callback invoked when the approve interaction is proposed.

TidalApprovalRequest.onReject (required)
(event: MouseEvent<HTMLButtonElement>) => void

Callback invoked when the reject interaction is proposed.

TidalApprovalRequest.title (required)
ReactNode

Required title value accepted by this exported component.

TidalApprovalRequest.approveButtonProps
Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "children"> | undefined

Optional approve button props value accepted by this exported component.

TidalApprovalRequest.approveLabel
string | undefined

Optional approve label value accepted by this exported component.

TidalApprovalRequest.approveRef
Ref<HTMLButtonElement> | undefined

Optional approve ref value accepted by this exported component.

TidalApprovalRequest.children
ReactNode

Optional children value accepted by this exported component.

TidalApprovalRequest.confirmation
TidalApprovalConfirmation | undefined

Optional confirmation value accepted by this exported component.

TidalApprovalRequest.description
ReactNode

Optional description value accepted by this exported component.

TidalApprovalRequest.details
ReadonlyArray<{ id: string; label: ReactNode; value: ReactNode; }> | undefined

Optional details value accepted by this exported component.

TidalApprovalRequest.disabled
boolean | undefined

Optional disabled value accepted by this exported component.

TidalApprovalRequest.readOnly
boolean | undefined

Optional read only value accepted by this exported component.

TidalApprovalRequest.rejectButtonProps
Omit<Omit<DetailedHTMLProps<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "ref">, "type" | "children"> | undefined

Optional reject button props value accepted by this exported component.

TidalApprovalRequest.rejectLabel
string | undefined

Optional reject label value accepted by this exported component.

TidalApprovalRequest.rejectRef
Ref<HTMLButtonElement> | undefined

Optional reject ref value accepted by this exported component.

TidalApprovalRequest.state
TidalApprovalState | undefined

Optional state value accepted by this exported component.

TidalApprovalRequest.statusNote
ReactNode

Optional status note value accepted by this exported component.

Complete usage

Full example, stylesheet imports, API and accessibility documentation

Gotchas