Skip to content

GhostInteractiveSurface reference ​

Package: @ghostvue/themes. Status: experimental (stability policy).

Themed wrapper around headless GhostInteractiveSurface. Same as/effects props; importing it loads the default stylesheet and scopes recipes to this instance. Spotlight tokens come from defineTheme interactivity. Hand-written because the wrapper is a .ts defineComponent.

Generated from the component manifest. Edit the manifest or Vue source, then rebuild the docs.

All component references

Props ​

NameTypeDefaultRequiredDescription
as'div' | 'article' | 'section' | 'aside'"div"NoRendered root element, forwarded to the unstyled GhostInteractiveSurface.
effectsInteractiveEffect[]"['spotlight']"NoRecipes advertised on data-interactive. v1 supports spotlight only.

Emits ​

None declared.

Models ​

None declared.

Slots ​

NameDescription
defaultSurface content. The glow layer is rendered by the unstyled primitive.

Slot props: default ​

None declared.

Exposed members ​

NameTypeDescription
elementHTMLElement | nullThe root element after mount; null before mount and after unmount. Delegates to the unstyled GhostInteractiveSurface.

Parts and data attributes ​

AttributeValueDescription
data-partrootThe element selected by as, inside the display:contents themed scope.
data-partglowDecorative spotlight overlay painted from interactive.spotlight tokens.
data-stateoffReduced motion, coarse pointer, or empty effects. Glow is not shown.
data-stateidleCapable of tracking. Glow opacity is 0.
data-statetrackingPointer is over the host. Glow follows --ghost-pointer-x/y.

CSS variables ​

NameDescription
--ghost-interactive-spotlight-sizeGlow diameter. Subtle default 10rem; none is 0px; expressive is 20rem.
--ghost-interactive-spotlight-opacityPeak glow opacity before --ghost-motion-intensity.
--ghost-interactive-spotlight-colorGlow color. Aliases action.primary.bg so mono stays a hairline.
--ghost-interactive-leave-springLeave-settle easing. Alias of motion.spring.snappy.
--ghost-interactive-leave-spring-durationLeave-settle duration. Instant tracking, spring on leave.
--ghost-pointer-xPointer x in CSS pixels.
--ghost-pointer-yPointer y in CSS pixels.

Accessibility ​

Role: generic. APG pattern: https://www.w3.org/WAI/ARIA/apg/practices/hiding-semantics/.

Required ARIA attributes: none.

Keyboard ​

None declared.

Verification ​

Each category is reviewed separately. Automated keyboard and axe results do not attest manual or assistive-technology review.

CategoryStatusEvidence
Automated keyboardNot reviewedNo declared key is mapped to a browser test yet.
Manual interactionNot reviewedNo review recorded.
Assistive technologyNot reviewedNo review recorded.

Examples ​

interactive-surface/feature-tiles ​

Example source

Feature tiles

Responsive grid of themed spotlight tiles, each with a focusable link as its action.

Pointer trackingAmbient
Updates --ghost-pointer-x and --ghost-pointer-y smoothly on pointer move.Read the styling hooks
Reduced motionAccessible
Disables spotlight tracking automatically when prefers-reduced-motion is active.Review accessibility behavior

interactive-surface/basic ​

Example source

Basic

Pointer spotlight on a content surface.

Quarterly report The glow follows the pointer. Copy stays readable without it.

interactive-surface/button ​

Example source

Button opt-in

Themed GhostButton stays inert until interactive is set.