Component libraryApproval request
Approval request
ProReview a proposed action, confirm its scope and approve or reject it.
npx shadcn@latest add @tidal-pro/approval-requestInstallation
Pro source is gated. Configure the @tidal-pro registry using the agent guide. Create an access key from your account after purchasing.
Terminal
Import components/ui/tidal.css, components/ui/approval-request.css, components/ui/status-badge.css, then add the component inside a tidal-scope wrapper. Its scoped design tokens keep it independent of your existing CSS.
Usage
Complete example source · Dependency and asset manifest
Loading the complete example…
API & behavior
Consumer-owned state (pending, approving, rejecting, approved, rejected, expired), title, optional description, stable-id details, contextual children and statusNote. Optional exact typed confirmation is fully controlled by its phrase/value/onValueChange. Keep each phrase nonempty and reset its value for a new request. Native input and action props/refs preserve caller handlers and prevention. Optional disabled/readOnly block decisions, and handled/busy states disable the persistent buttons. Approval requires an exact phrase match when configured; rejection remains available independently. Status changes after an activated action recover focus to the persistent note if its button is disabled. Button types remain button even inside forms. The outer section is labelled by its title or explicit native label. Consumers own authorization, expiration, audit records, side effects and errors; this component never executes a proposed action.
Style with the --t-* CSS variables. Set data-theme="dark" on your tidal-scope wrapper for a dark surface. Motion respects the system’s reduced-motion preference.