Skip to content

ScifiPanelPawn

WASM Powered
🏅Original

ScifiPanelPawn is the lightweight tactical container in the TechUI Scifi panel series.

It adopts a minimalist "Symmetric Chamfer" design language. By default, it consists only of Diagonal Slits at two corners. This extremely restrained design significantly reduces visual interference, preserving the maximum transparency of the content within the container.

Note: This component can be invoked using ScifiPanelB3 or its semantic alias ScifiPanelPawn.

Basic Usage

Default Morphology

By default, B3 renders diagonal slits at the four corners. It automatically adapts to the size of the internal content. This diagonal design is more dynamic than right angles, possessing a sense of "locking-on" movement.

vue
<template>
  <div style="width: 300px; height: 200px;">
    <ScifiPanelPawn>
      <div class="target-box">
        <span class="label">TARGET DETECTED</span>
      </div>
    </ScifiPanelPawn>
  </div>
</template>

<style scoped>
.target-box {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #00eeff;
  letter-spacing: 2px;
}
</style>

Visual Variants

The core of B3 lies in the switching of corner shapes, allowing it to transition freely between "agile" and "stable" styles.

Decoration Alt

The decorationAlt property is the key attribute for switching the B3 style.

  • False (Default): Diagonal Chamfers. Sharper visual, strong tech feel, resembling an aircraft HUD interface.
  • True: Right-angle L-shaped Corners. More stable visual, similar to traditional viewfinder frames, providing a stronger sense of enclosure.
vue
<template>
  <div class="grid">
    <ScifiPanelPawn>
      <div class="p-4">Agile Mode</div>
    </ScifiPanelPawn>

    <ScifiPanelPawn :decorationAlt="true">
      <div class="p-4">Stable Mode</div>
    </ScifiPanelPawn>
  </div>
</template>

Minimalism and Boldness (Border Width)

By adjusting borderWidth, you can change the visual weight of the corner marks.

  • Decoration: False: If decoration is turned off, B3 degrades into a more stealthy dot-like or miniature corner mark style.
vue
<template>
  <ScifiPanelPawn :borderWidth="3" :decorationAlt="true">
    <div class="p-4">Lock Frame</div>
  </ScifiPanelPawn>
</template>

Cyber Glow

The corner marks of B3 are perfectly suited for glow effects. When glow is enabled, the cursors at the four corners present a highlighted halo, much like the "item highlight" effect in video games.

vue
<template>
  <ScifiPanelPawn 
    :glow="true" 
    :glowOpacity="1"
    className="neon-cursor"
  >
    <div class="item-slot">ITEM SELECTED</div>
  </ScifiPanelPawn>
</template>

CSS Variable

The lightweight nature of B3 makes it ideal for various high-saturation neon color schemes. Through CSS variables, we can define styles such as "Void Neon" or "Stealth Gray".

Case: Void Neon Style

This style uses contrasting purple and cyan to simulate neon sign frames in cyberpunk aesthetics.

vue
<template>
  <ScifiPanelPawn 
    className="panel-void"
    rotate="z"
    :decorationAlt="true"
    :glow="true"
    :backgroundOpacity="0.8"
  >
    <div class="neon-content">
      NEON CITY
    </div>
  </ScifiPanelPawn>
</template>

<style lang="less">
/* Custom Void Neon Style */
.panel-void {
  /* Border: Purple */
  --sf-panel-bd: #d946ef;
  
  /* Background: Extremely deep purple background */
  --sf-panel-bg: rgba(20, 0, 30, 0.9);
  
  /* Glow: Strong purple halo */
  --sf-panel-glow: #a855f7;
  
  /* Decoration Highlight: Cyan (creating contrast) */
  --sf-panel-hlite: #22d3ee;
}
</style>

Combined Usage

Lists and Grids

Because B3 has minimal visual interference, it is an excellent choice for creating nine-square menus or dense data lists.

vue
<template>
  <div class="grid-menu" style="display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;">
    <ScifiPanelPawn v-for="i in 6" :key="i" :backgroundOpacity="0.5">
      <div class="grid-item">Module {{ i }}</div>
    </ScifiPanelPawn>
  </div>
</template>

API Reference

Props

PropertyDescriptionTypeDefault
decorationWhether to display corner mark decorationsBooleantrue
decorationAltDecoration Variant. false for diagonal chamfers, true for L-shaped right anglesBooleanfalse
borderdWhether to display corner mark linesBooleantrue
borderWidthLine width (px)Number
backgroundOpacityBackground color opacity (0-1)Number
backgroundBlurWhether to enable background glass morphismBooleanfalse
glowWhether to enable the outer glow filterBooleanfalse
glowOpacityOuter glow opacity (0-1)Number
rotateRotation/Mirror. x/y/z can change the direction of diagonal chamfersString
scaleOverall scale ratioNumber1
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)

Released under the MIT License.