Skip to content

Media Theme

@astryxdesign/core v0.7.1 · MediaTheme

Props ​

NameTypeDefaultDescription
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 ​

NameDescription
defaultContent rendered with the surface colors.

useMediaTheme ​

FieldDescription
modeResolved 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.