Skip to content

ScifiPanelZone

WASM Powered
🧬Ported from [DataV]

ScifiPanelZone is a universal area-defining 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-7). It utilizes a standardized "Corner Reinforcement" design language. On top of the basic rectangular border, the structure is reinforced with prominent L-shaped brackets at the four corners.

Its lines are tougher and sharper, and it supports the independent definition of the base border color and the corner decoration color, allowing for rich color layering. This makes it a highly adaptable all-purpose default container, suitable for any module that requires clear boundaries.

Note: This component can be invoked via ScifiPanelDV5 or its semantic alias ScifiPanelZone.

Basic Usage

Default Form

By default, DV5 renders a rectangle with a thin border, with bold L-shaped brackets covering the four corners.

vue
<template>
  <div style="width: 400px; height: 300px;">
    <ScifiPanelZone>
      <div class="box-content">
        <span>Module Loaded</span>
      </div>
    </ScifiPanelZone>
  </div>
</template>

Visual Variants

The configuration of DV5 allows you to switch between "strong decoration" and "plain border".

Brackets Decoration (Decoration)

The core visual feature of DV5 is the brackets at the four corners.

  • True (Default): Displays L-shaped brackets at the four corners, emphasizing the sense of boundary.
  • False: Hides the four corner brackets, keeping only the basic rectangular border.
vue
<template>
  <div class="grid">
    <ScifiPanelZone />

    <ScifiPanelZone :decoration="false">
      <div class="p-4">Plain Border</div>
    </ScifiPanelZone>
  </div>
</template>

Line Thickness (Border Width)

borderWidth simultaneously affects the thickness of both the base border and the corner brackets.

  • Increasing this value can make the panel look more solid, similar to heavy armor.
vue
<template>
  <ScifiPanelZone 
    :borderWidth="3" 
    :backgroundOpacity="0.8"
  >
    <div class="p-4">Heavy Duty</div>
  </ScifiPanelZone>
</template>

Glow

When glow is enabled, both the border and the brackets will produce a soft halo. Since the lines of DV5 are continuous, the glow effect is very uniform, making it suitable for holographic windows.

vue
<template>
  <ScifiPanelZone 
    :glow="true" 
    className="dv5-neon"
  />
</template>

CSS Variable

The dual-color structure of DV5 (base line + corner decoration) is ideal for dual-color themes.

Case Study: Crimson Storm Style

This style uses dark red as the base and bright red as the corner highlight to create a warning or combat atmosphere.

vue
<template>
  <ScifiPanelZone 
    className="panel-crimson"
    :backgroundBlur="true"
    :backgroundOpacity="0.6"
  >
    <div class="alert-info">
      WARNING: BREACH DETECTED
    </div>
  </ScifiPanelZone>
</template>

<style lang="less">
.panel-crimson {
  /* Base Border: Dark Red */
  --sf-panel-bd: #7f1d1d;
  
  /* Corner Brackets: Bright Red */
  --sf-panel-hlite: #ef4444;
  
  /* Background: Deep Red-Black */
  --sf-panel-bg: rgba(69, 10, 10, 0.7);
  
  /* Glow: Orange-Red */
  --sf-panel-glow: #f87171;
}
</style>

API Reference

Props

PropertyDescriptionTypeDefault
decorationDecoration Toggle. Whether to show L-shaped brackets at the cornersBooleantrue
borderdBorder Toggle. Whether to show basic rectangular linesBooleantrue
borderWidthLine 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.