ef-resolution

This element is a resolution picker for the inline CSS width and height styles of a target element.

This element is a resolution picker for the inline CSS width and height styles of a target element.

Attributes

AttributeReact propTypeDefaultDescription
targettargetstring""ID of the target element this component controls or reads from.

CSS Parts

PartDescription
height-inputThe custom height number input. This part appears only in custom mode.
selectThe dropdown list of preset resolutions.
separatorThe "×" symbol between the width and height inputs.
width-inputThe custom width number input. This part appears only in custom mode.

CSS Custom Properties

PropertyDefaultDescription
--ef-color-surfacergba(0, 0, 0, 0.6)Fallback background color source for `--ef-resolution-bg` (not currently part of the shared theme token set).
--ef-resolution-bgvar(--ef-color-surface, rgba(0, 0, 0, 0.6))Background color of the dropdown/inputs.
--ef-resolution-border-colorvar(--ef-color-border, rgba(255, 255, 255, 0.2))Border color of the dropdown/inputs.
--ef-resolution-colorvar(--ef-color-text, #fff)Text color.
--ef-resolution-font-size12pxFont size of the dropdown/inputs.

Events

EventDetailDescription
resolution-change{ width: number; height: number }Fires with a `{ width, height }` detail when the resolution changes. The change can come from a preset choice or a custom width and height input.