Desliza para confirmar, con estados de carga, éxito y error.
npx shadcn@latest add https://reactbits.dev/r/SlideCommit-TS-TW
Para acciones frecuentes: confirmar, marcar, valorar. El feedback convierte un clic en una sensación.
| Prop | Tipo | Por defecto |
|---|---|---|
| label | ReactNode | "Slide to pay" |
| doneLabel | ReactNode | "Paid" |
| errorLabel | ReactNode | "Payment failed" |
| onConfirm | () => void | Promise<unknown> | - |
| onDone | () => void | - |
| onError | (reason: unknown) => void | - |
| trackColor | string | "#262626" |
| handleColor | string | "#f5f5f5" |
| successColor | string | "#22c55e" |
| dangerColor | string | "#e5484d" |
| width | number | 280 |
| height | number | 56 |
| radius | number | 28 |
| speed | number | 50 |
| returnBounce | number | 0.38 |
| landingDip | number | 0.026 |
| holdMs | number | 1500 |
| disabled | boolean | false |
| icon | ReactNode | undefined |
| className | string | "" |