Media Theme
@astryxdesign/core v0.7.1 · MediaTheme
Props
| Name | Type | Default | Description |
|---|---|---|---|
mode | 'dark' | 'light' | 'auto' | 'off' | — | Surface luminance. auto measures the parent. off keeps the surrounding theme. |
fallback | 'dark' | 'light' | 'dark' | Side auto uses before the surface can be measured, and when it cannot. Ignored for the other modes. |
Slots
| Name | Description |
|---|---|
default | Content rendered with the surface colors. |
useMediaTheme
| Field | Description |
|---|---|
mode | Resolved dark, light, or off. Outside a MediaTheme, the mode is off. |
Template ref
The component exposes element with type HTMLElement | null.
Native attributes
The root is a div with display: contents. class and style are applied to it. Other attributes are not forwarded.