Add migration-driven theme and modal primitives

This commit is contained in:
2026-10-29 23:01:50 +01:00
parent f3fcafcb7d
commit 1944cb8f5a
7 changed files with 72 additions and 2 deletions
+20
View File
@@ -55,6 +55,13 @@ npm install @fretuks/frost
</div>
```
Compact and icon controls are available when a project needs smaller repeated actions:
```html
<button class="frost-button frost-button--secondary frost-button--sm">Edit</button>
<button class="frost-button frost-button--ghost frost-button--icon" aria-label="Close">×</button>
```
## Forms
```html
@@ -93,6 +100,19 @@ body.theme-blue {
}
```
`--frost-color-selection` and `--frost-color-overlay` are available for theme-specific selection and overlay colors. Frost's modal primitives provide visual structure only; opening, closing, focus management, and ARIA behavior remain application responsibilities.
```html
<div class="frost-backdrop" hidden></div>
<section class="frost-modal" role="dialog" aria-modal="true" aria-labelledby="dialog-title" hidden>
<div class="frost-modal__content">
<header class="frost-modal__header"><h2 id="dialog-title">Confirm</h2></header>
<div class="frost-modal__body">Continue?</div>
<footer class="frost-modal__footer"><button class="frost-button frost-button--primary">OK</button></footer>
</div>
</section>
```
## Customization
Override semantic tokens in the project layer: