-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
37 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.starters/default/content/3.components/1.elements/5.modal.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Modal | ||
|
||
A `Modal` is a component that appears on top of the main content of the page. It is used to display important information or to request user input, while blocking interaction with the rest of the page. | ||
|
||
## Focus | ||
|
||
`Modal` traps focus within it's content while it is open. When the `Modal` is closed, focus is returned to the element that had focus before the `Modal` was opened. | ||
|
||
## Props | ||
|
||
| Name | Type | Default | Description | | ||
| --- | --- | --- | --- | | ||
| `modelValue` | `boolean` | `false` | Whether the `Modal` is opened or not. | | ||
|
||
## Design Tokens | ||
|
||
```ts [tokens.config.ts] | ||
import { defineTheme } from 'pinceau' | ||
|
||
export default defineTheme({ | ||
elements: { | ||
modal: { | ||
zIndex: '50', | ||
scrim: { | ||
backgroundColor: { | ||
initial: '{color.gray.50}', | ||
dark: '{color.gray.900}' | ||
}, | ||
backdropFilter: 'none' | ||
}, | ||
}, | ||
} | ||
}) | ||
``` |