Brutal modal
A square sheet with a thick ink outline and a big hard shadow.
Customize
Props
Tone
Installation
npx shadcn@latest add https://skinsui.dev/r/modal-brutal.jsonUsage
usage.tsx
import { Modal } from "@/components/skins/modal-brutal";<Modal triggerLabel="Delete project" title="Delete this project?" description="Its pages, settings and history will be removed. You can't undo this." confirmLabel="Delete" tone="danger"/>Props
| Prop | Type | Default | Description |
|---|---|---|---|
| triggerLabel | string | "Open" | The label of the button that opens it. |
| title | string | None | The heading, read out when it opens. |
| description | string | None | The line under the title. |
| confirmLabel | string | "Confirm" | The label of the main action. |
| cancelLabel | string | "Cancel" | The label of the button that closes it. |
| tone | "default" | "danger" | "default" | Danger colours the main action red, for things that can't be undone. |
| onConfirm | () => void | None | Called when the main action is pressed, just before it closes. |
- triggerLabel"Open"
stringThe label of the button that opens it.
- titleNone
stringThe heading, read out when it opens.
- descriptionNone
stringThe line under the title.
- confirmLabel"Confirm"
stringThe label of the main action.
- cancelLabel"Cancel"
stringThe label of the button that closes it.
- tone"default"
"default" | "danger"Danger colours the main action red, for things that can't be undone.
- onConfirmNone
() => voidCalled when the main action is pressed, just before it closes.