Native iOS-style alert dialogs with customizable actions
1npm install @openwebf/react-cupertino-ui1import { FlutterCupertinoAlert } from '@openwebf/react-cupertino-ui';
2
3export function AlertExample() {
4 return (
5 <FlutterCupertinoAlert
6 title="Welcome"
7 message="This is a basic iOS-style alert dialog."
8 confirmText="OK"
9 onConfirm={() => console.log('Confirmed')}
10 />
11 );
12}| Name | Type | Default | Description |
|---|---|---|---|
| title | string | - | Dialog title text. |
| message | string | - | Dialog message/body text. |
| cancelText | string | - | Cancel button label (omit to hide cancel). |
| confirmText | string | - | Confirm button label. |
| onCancel | (event: CustomEvent<void>) => void | - | Fires when cancel is pressed. |
| onConfirm | (event: CustomEvent<void>) => void | - | Fires when confirm is pressed. |
| Name | Type | Default | Description |
|---|---|---|---|
| show(options) | (options: { title?: string; message?: string }) => void | - | Show the dialog (optionally overriding title/message). |
| hide() | () => void | - | Hide the dialog. |