Skip to content

ScifiDecoHive

WASM Powered
Star

ScifiDecoHive (Hive/蜂巢) is the hexagonal badge component in the TechUI Scifi Deco series.

It focuses on a deep interpretation of the "Hexagonal Structure". In sci-fi UI design language, the hexagon (honeycomb structure) is synonymous with ultimate efficiency and structural stability, serving as one of the most iconic visual symbols.

Compared to the lightweight basic hexagon in A1, B2 features heavier mechanical edging, richer internal textures, and a complex multi-layer nested structure. It acts as a reinforced energy unit or high-tech storage box, making it ideal for Skill Tree Nodes, Inventory Slots, or Technology Research Icons.

Tip: This component can be invoked via ScifiDecoB2 or its semantic alias ScifiDecoHive.

Basic Usage

Default Form

By default (appearance="A"), B2 renders as a hexagonal container with a sci-fi border. The default slot automatically centers content horizontally and vertically.

vue
<template>
  <div class="hive-group">
    <ScifiDecoHive>
      <icon name="bi-box-seam" />
    </ScifiDecoHive>
    
    <ScifiDecoHive>
      <span class="level">LV.5</span>
    </ScifiDecoHive>
  </div>
</template>

Appearance

B2 provides four hexagonal structure variants with increasing visual complexity.

Mode Comparison

  • Type A (Default): Standard Hive. Clear border lines with minimal corner decorations; provides the strongest versatility.
  • Type B: Armored. Adds extra reinforcement modules at the corners of the hexagon for a sturdier visual, suitable for defense-related attributes.
  • Type C: Double Layer Force Field. Features dual inner and outer lines with a hollow or energy-filled sensation; ideal for high-level skills.
  • Type D: Heavy Core. The most complex variant with a large fill area and mechanical interlocking structures at the top and bottom; suitable for "Ultimate Skills" or "Core Tech" icons.
vue
<template>
  <div class="grid">
    <ScifiDecoHive appearance="A">Standard</ScifiDecoHive>
    <ScifiDecoHive appearance="B">Armored</ScifiDecoHive>
    <ScifiDecoHive appearance="C">Double Layer</ScifiDecoHive>
    <ScifiDecoHive appearance="D">Ultimate</ScifiDecoHive>
  </div>
</template>

Size & Layout

Fixed Size and Scaling (Scale)

The ScifiDeco series is drawn based on an 80px x 80px coordinate system. Do not use CSS to modify width and height; the scale property must be used for lossless scaling. Uniform scaling is particularly important when arranging hexagonal structures in a honeycomb grid.

  • scale="1": 80px (Default)
  • scale="1.2": 96px (Suitable for selected states)
  • scale="0.8": 64px (Suitable for dense arrays)
vue
<template>
  <div class="honeycomb-grid">
    <ScifiDecoHive v-for="i in 6" :key="i" :scale="0.8">
      <icon :name="`tech-${i}`" />
    </ScifiDecoHive>
  </div>
</template>

Visual

Glow & Atmosphere

  • glow: Enables the glow filter. The acute angles of the hexagon produce beautiful starburst effects when glowing.
  • glowRange: Controls the halo range.
  • backgroundOpacity: Adjusts the transparency of the background fill inside the hexagon.

Color Variants (Color Alt)

  • decorationColorAlt: Swaps the highlight color and focus color.
  • This can be used to distinguish between "Unlocked" and "Locked" technologies, or "Active Skills" and "Passive Skills".
vue
<template>
  <ScifiDecoHive 
    appearance="A" 
    :decorationColorAlt="true" 
    :backgroundOpacity="0.1"
    className="tech-locked"
  >
    <icon name="lock" />
  </ScifiDecoHive>
</template>

CSS Variable

Using CSS variables, you can customize B2 into "Cyber Wasp" or "Frost Shield" styles.

Case Study: Cyber Wasp Style

This example defines an industrial engineering-style hive with a yellow and black color scheme.

vue
<template>
  <ScifiDecoHive 
    appearance="C" 
    className="deco-hive"
    :scale="1.1"
  >
    <icon name="drone" />
  </ScifiDecoHive>
</template>

<style lang="less">
.deco-hive {
  /* Base Colors */
  --sf-deco-hlite: #facc15;  /* Bee Yellow Highlight */
  --sf-deco-bd: #854d0e;     /* Dark Gold Border */
  --sf-deco-bg: rgba(30, 20, 0, 0.6); /* Black-Yellow Background */
  
  /* Content Text */
  --sf-deco-fc: #fef08a;     /* Light Yellow Text */
  
  /* Glow Enhancement */
  --sf-deco-glow: #eab308;   /* Gold Halo */
  --sf-deco-glowop: 0.7;
}
</style>

Variable Dictionary

Major CSS variables supported by ScifiDecoHive:

Variable NameDescriptionDefault Value
Base Appearance
--sf-deco-sizeComponent base size (Fixed)80px
--sf-deco-bgBackground fill color inside the hexagonvar(--scifi-bg)
--sf-deco-bgopBackground opacity1
--sf-deco-bdHexagon line colorvar(--scifi-bd)
Decoration & Highlight
--sf-deco-hlitePrimary hexagon color (SVG stroke)var(--scifi-hlite)
--sf-deco-focusAuxiliary reinforcement/corner colorvar(--scifi-focus)
--sf-deco-glowGlow filter colorvar(--scifi-hlite)
Content Slot
--sf-deco-fcText/Icon color in slotvar(--font-strong)
--sf-deco-fzDefault text size in slot24px

API Reference

Props

PropertyDescriptionTypeDefault
appearanceAppearance Variant: 'A', 'B', 'C', 'D'String'A'
scaleScaling Ratio (based on 80px)Number1
glowGlow Switch: Toggles filter haloBooleantrue
glowRangeGlow rangeNumber10
glowOpacityGlow opacityNumber
borderdWhether to display border linesBooleantrue
decorationColorAltDecoration Variant: Swaps highlight and focus colorsBooleanfalse
backgroundOpacityBackground opacityNumber
classNameCustom class nameString

Slots

Slot NameDescription
defaultComponent content; automatically absolutely centered.

Released under the MIT License.