Skip to content

ScifiPanelReactor

WASM Powered
Star
🧬Ported from [DataV]

ScifiPanelReactor is a dynamic and active container within the TechUI Scifi panel series.

It was ported and reconstructed from the open-source project @jiaminghi/data-view (original prototype dv-border-box-1). It adopts a classic "Four-corner Energy Containment" design language. The visual focus is dispersed to the four corners of the panel, where multiple sets of precise geometric lines construct a stable "mechanical gripper" form, featuring built-in breathing flicker animations.

This design provides a clear sense of boundaries while continuously attracting user attention through the dynamic rhythm of the corners. Acting like a small running reactor, it is ideal for Key Performance Indicator (KPI) cards, independent functional modules, or floating pop-ups, injecting a continuous sense of energy into static pages.

Note: This component can be invoked via ScifiPanelDV2 or its semantic alias ScifiPanelReactor.

Basic Usage

Default Form

By default, DV2 renders complex sci-fi decorations at the four corners with an automatic breathing flicker effect. The connecting lines of the border are relatively thin, emphasizing the visual weight of the corners.

vue
<template>
  <div style="width: 400px; height: 300px;">
    <ScifiPanelReactor>
      <div class="card-content">
        <span class="label">MODULE 01</span>
      </div>
    </ScifiPanelReactor>
  </div>
</template>

Visual Variants

The morphological changes of DV2 mainly revolve around "decorative complexity" and "dynamic effects".

Animation Control

The decorative lines at the four corners feature a breathing animation (periodic change in opacity) by default.

  • True (Default): Enables the breathing effect, making the interface more lifelike.
  • False: Static display, suitable for low-power modes or scenarios where user distraction should be minimized.
vue
<template>
  <div class="grid">
    <ScifiPanelReactor />

    <ScifiPanelReactor :animation="false" />
  </div>
</template>

Minimalism and Borders (Decoration & Border)

  • borderd: Controls whether the thin borders connecting the four corners are displayed. If set to false, only the corner decorations remain, creating a more open visual.
  • decoration: Controls the details of the corner decorations.
  • borderWidth: Adjusts the thickness of the border lines.
vue
<template>
  <ScifiPanelReactor 
    :borderd="false" 
    :backgroundOpacity="0.5"
  >
    <div class="content">OPEN VIEW</div>
  </ScifiPanelReactor>
  
  <ScifiPanelReactor :borderWidth="3" />
</template>

Glow

When glow is enabled, the breathing light effect at the four corners superimposes a highlight halo, creating a visual impact similar to an "energy pulse".

vue
<template>
  <ScifiPanelReactor 
    :glow="true" 
    className="dv2-pulse"
  />
</template>

CSS Variable

The corner decorations of DV2 are defined by two main colors (border color + highlight color), which can be easily customized via CSS variables.

Case Study: Phantom Purple Style

This style utilizes a deep purple background and highlighted borders to create a mysterious high-tech feel.

vue
<template>
  <ScifiPanelReactor 
    className="panel-phantom"
    :glow="true"
    :backgroundOpacity="0.9"
  >
    <div class="info-box">
      SYSTEM LOCKED
    </div>
  </ScifiPanelReactor>
</template>

<style lang="less">
.panel-phantom {
  /* Base Border Color: Purple */
  --sf-panel-bd: #7c3aed;
  
  /* Corner Decoration/Highlight Color: Bright Cyan (contrast) or Light Purple */
  --sf-panel-hlite: #a78bfa;
  
  /* Background Color: Deep Purple-Black */
  --sf-panel-bg: rgba(20, 0, 30, 0.9);
  
  /* Glow Color */
  --sf-panel-glow: #8b5cf6;
}
</style>

API Reference

Props

PropertyDescriptionTypeDefault
animationAnimation Toggle. Whether to enable breathing/flicker animations at the cornersBooleantrue
decorationDecoration Toggle. Whether to show complex details at the cornersBooleantrue
borderdBorder Toggle. Whether to show the thin lines connecting the four cornersBooleantrue
borderWidthBorder line width (px)Number
backgroundOpacityBackground opacity (0-1)Number
backgroundBlurWhether to enable background glassmorphismBooleanfalse
glowWhether to enable outer glowBooleanfalse
classNameCustom container class nameString

CSS Variables

You can override the following variables at the component's parent level or via className to control the component's color scheme and appearance.

Variable NameDescriptionDefault Reference
--sf-panel-bgPanel background fill colorvar(--scifi-bg)
--sf-panel-bgopBackground opacityvar(--cpt-panel-bgop, 1)
--sf-panel-bdBorder line colorvar(--scifi-bd)
--sf-panel-bdwBorder line widthvar(--cpt-panel-bdw, 1px)
--sf-panel-fcTitle text colorvar(--scifi-fc)
--sf-panel-hlitehighlight colorvar(--scifi-hlite)
--sf-panel-focusFocus colorvar(--scifi-focus)
--sf-panel-glowInner glow colorvar(--scifi-focus)
--sf-panel-glowopInner glow opacityvar(--cpt-panel-glowop, .5)
--sf-panel-shadowContainer shadowvar(--shadow-weak)
--sf-panel-scaleOverall scaling ratiovar(--cpt-panel-scale)

Credits

This component is ported from the open-source library jiaminghi/data-view. On this foundation, deep customization has been performed based on the TechUI global theme, and numerous APIs have been added to significantly enhance the component's capabilities.

We would like to express our sincere gratitude and respect to the author, JiaMing!

Released under the MIT License.