Skip to content

Commit 38f3cbb

Browse files
committed
docs: clarify modal width auto
1 parent 9a520c5 commit 38f3cbb

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 |
@@ -67,6 +67,7 @@ ui.modal({
6767

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.
70+
- `width: "auto"` sizes to content/actions and is clamped by `maxWidth` and the viewport.
7071

7172
## Related
7273

0 commit comments

Comments
 (0)