Skip to content

Commit af4cfca

Browse files
RtlZeroMemoryRezoR0xFF
authored andcommitted
docs: clarify modal width auto
1 parent 71962ab commit af4cfca

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

docs/widgets/modal.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ ui.layers([
2929
| `title` | `string` | - | Optional modal header title |
3030
| `content` | `VNode` | **required** | Main modal body |
3131
| `actions` | `VNode[]` | `[]` | Action row (typically buttons) |
32-
| `width` | `number \| "auto"` | `"auto"` | Preferred modal width |
32+
| `width` | `number \| "auto"` | `~70%` | Preferred modal width |
3333
| `maxWidth` | `number` | - | Maximum width constraint |
3434
| `backdrop` | `"none" \| "dim" \| "opaque"` | `"dim"` | Backdrop style |
3535
| `closeOnBackdrop` | `boolean` | `true` | Close when clicking backdrop |
@@ -68,6 +68,7 @@ ui.modal({
6868
- Modals are rendered by conditionally including them in the tree (there is no `open` prop).
6969
- Render modals inside `ui.layers(...)` so they stack above base content.
7070
- Backdrops are rendered behind the modal. `"dim"` uses a light shade pattern; `"opaque"` clears the area behind the modal to the theme background color.
71+
- `width: "auto"` sizes to content/actions and is clamped by `maxWidth` and the viewport.
7172

7273
## Related
7374

0 commit comments

Comments
 (0)