Skip to content

ScifiPanelRanger

WASM Powered
Star
🧬Ported from [DataV]

ScifiPanelRanger is a vertically constrained 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-6). It utilizes a unique "Lateral Clamping" design language. The visual focus is located on the left and right sides of the panel, defined by thick vertical brackets, while precisely calculated micro-anchors are configured at the four corners.

This design visually constructs a strong "tactical clamping feel," as if the content is securely locked within a vertical channel. It is extremely suitable for constraining vertically arranged information flows (such as system logs, functional menus, timelines) or serving as edge-defining containers on both sides of a layout, effectively enhancing the sense of longitudinal order on the page.

Note: This component can be invoked via ScifiPanelDV3 or its semantic alias ScifiPanelRanger.

Basic Usage

Default Form

By default, DV3 renders a rectangle with a thin border, supplemented by bold vertical bars on the left and right sides and small dots at the four corners.

vue
<template>
  <div style="width: 400px; height: 300px;">
    <ScifiPanelRanger>
      <div class="list-container">
        <ul>
          <li>Module A [OK]</li>
          <li>Module B [OK]</li>
          <li>Module C [OK]</li>
        </ul>
      </div>
    </ScifiPanelRanger>
  </div>
</template>

Visual Variants

The configuration options for DV3 are mainly focused on the fine-tuning of the "brackets" and "anchors".

Decoration and Border (Decoration & Border)

The structure of DV3 is divided into three layers: background, thin border, and thick decoration.

  • decoration: Controls whether the thick vertical bars on the left and right sides are displayed.
  • borderd: Controls whether the thin border connecting the entire structure is displayed.
vue
<template>
  <div class="grid">
    <ScifiPanelRanger :borderd="false">
      <div class="p-4">Side Brackets Only</div>
    </ScifiPanelRanger>

    <ScifiPanelRanger :decoration="false">
      <div class="p-4">Dots Only</div>
    </ScifiPanelRanger>
  </div>
</template>

Anchor Customization (Dots)

The details of the anchors at the four corners can be adjusted through parameters, which has been enhanced based on the original DataV component.

  • dotSize: The pixel size of the anchors.
  • dotOffset: The offset distance of the anchors from the vertices.
vue
<template>
  <ScifiPanelRanger 
    :decoration="false"
    :dotSize="5"
    :dotOffset="8"
    :borderWidth="2"
  >
    <div class="content">Custom Dots</div>
  </ScifiPanelRanger>
</template>

Glow

When glow is enabled, the vertical bars on the left and right and the corner anchors will produce a distinct halo.

vue
<template>
  <ScifiPanelRanger 
    :glow="true" 
    className="dv3-neon"
  />
</template>

CSS Variable

The color scheme of DV3 is primarily defined by two colors: the border color (thin lines) and the highlight color (thick vertical bars + anchors).

Case Study: Titan Grey Style

This style uses low-saturation gray and white to create an industrial texture similar to a mechanical shell.

vue
<template>
  <ScifiPanelRanger 
    className="panel-titan"
    :borderd="false"
    :backgroundOpacity="0.8"
  >
    <div class="mech-info">
      ARMOR STATUS: 100%
    </div>
  </ScifiPanelRanger>
</template>

<style lang="less">
.panel-titan {
  /* Base border color (if any) */
  --sf-panel-bd: #4b5563;
  
  /* Vertical bars and anchors: Bright white */
  --sf-panel-hlite: #f3f4f6;
  
  /* Background color: Dark gray mechanical color */
  --sf-panel-bg: rgba(31, 41, 55, 0.9);
  
  /* Glow color: Cold white */
  --sf-panel-glow: #e5e7eb;
}
</style>

API Reference

Props

PropertyDescriptionTypeDefault
decorationDecoration Toggle. Whether to show the thick vertical bars on the left and rightBooleantrue
borderdBorder Toggle. Whether to show the thin border connecting the wholeBooleantrue
dotSizeAnchor Size (px). Dimensions of the small squares/dots at the cornersNumber2
dotOffsetAnchor Offset (px). Distance of the anchor from the vertexNumber0
borderWidthThin border 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.