Skip to content

ScifiPanelProtocol

WASM Powered
Star
🧬Ported from [DataV]

ScifiPanelProtocol is a classically reconstructed container within the TechUI Scifi panel series.

It was ported and reconstructed from the open-source project @jiaminghi/data-view (dv-border-box-11) and underwent deep secondary development and refactoring by aYin to fully integrate it into the unified TechUI configuration system.

It adopts a rigorous "axially symmetric" design language, featuring a fixed and prominent top title bar. The sides of the title bar integrate continuously flickering rectangular breathing lights. This dynamic decoration not only balances the visual center of gravity but also injects continuous vitality into the interface.

This design makes it ideal as a core chart container or a main frame for secondary pages. Its inherent "breathing" sensation effectively breaks the dullness of a data dashboard, enhancing interface activity while emphasizing order.

Note: This component can be invoked via ScifiPanelDV1 or its semantic alias ScifiPanelProtocol.

Basic Usage

Default Form

By default, DV1 renders a border with a top title bar.

⚠️ Title Width Adaptation

The SVG path of DV1 is drawn based on mathematical calculations. If your title is long, you must manually set the titleWidth; otherwise, the border lines will pass through the text.

vue
<template>
  <div style="width: 500px; height: 300px;">
    <ScifiPanelProtocol title="Core Data Monitor" :titleWidth="200">
      <div class="content-box">
        Content Area...
      </div>
    </ScifiPanelProtocol>
  </div>
</template>

Visual Variants

The visual core of DV1 lies in its top decorative animation.

Decorative Animation (Decoration)

There are dynamic flickering rectangular blocks on both sides of the title bar.

  • True (Default): Displays dynamic decorations to increase the sense of technology.
  • False: Hides decorations, keeping only the static border for a cleaner look.
vue
<template>
  <div class="grid">
    <ScifiPanelProtocol title="Dynamic Mode" />

    <ScifiPanelProtocol 
      title="Static Mode" 
      :decoration="false" 
    />
  </div>
</template>

Color Variant (Color Alt)

Through decorationColorAlt, you can change the color logic of the top decoration (swapping the highlight color and focus color).

  • False: Default color scheme.
  • True: Uses a variant color scheme, usually to make the decoration more eye-catching.
vue
<template>
  <ScifiPanelProtocol 
    title="High Contrast" 
    :decorationColorAlt="true" 
    :titleWidth="180"
  />
</template>

Borders and Light Effects

Supports standard TechUI border thickness adjustment and global glow effects.

vue
<template>
  <ScifiPanelProtocol 
    title="NEON FRAME" 
    :borderWidth="3"
    :glow="true"
    className="dv1-neon"
  />
</template>

CSS Variable

DV1 perfectly supports the TechUI CSS variable system. By overriding the following variables, you can easily achieve styles such as "Data Blue" or "Amber Alert."

Case Study: Data Blue Style

vue
<template>
  <ScifiPanelProtocol 
    className="panel-data-blue"
    title="SERVER NODE"
    :backgroundBlur="true"
    :backgroundOpacity="0.6"
  />
</template>

<style lang="less">
.panel-data-blue {
  /* Border: Deep Cyan */
  --sf-panel-bd: #1d4ed8;
  
  /* Decoration/Text: Bright Cyan */
  --sf-panel-fc: #60a5fa;
  --sf-panel-hlite: #93c5fd;
  
  /* Background */
  --sf-panel-bg: rgba(30, 58, 138, 0.4);
}
</style>

API Reference

Props

PropertyDescriptionTypeDefault
titleTitle Content. Displayed in the top centerString
titleWidthTitle Width (px). Needs to be manually adapted to text lengthNumber150
decorationAnimation Toggle. Whether to show dynamic decorations on both sides of the titleBooleantrue
decorationColorAltDecoration Variant. Whether to use contrasting colors for decorationBooleanfalse
borderdWhether to show the borderBooleantrue
borderWidthBorder line width (px)Number
backgroundOpacityBackground opacity (0-1)Number
backgroundBlurWhether to enable background glassmorphismBooleanfalse
glowWhether to enable outer glowBooleanfalse
glowOpacityOuter glow intensity (0-1)Number
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.