Skip to content

ScifiHeaderRazor

WASM Powered
Star
👑Pioneer

Scifi Header - Razor is a hardcore tactical header component in the TechUI Scifi series.

It abandons the streamlined dynamic design of A1 and instead adopts an aggressive design language of "Sharp Edge Cutting" and "Geometric Splicing".

Visually, it possesses laterally extending wings as sharp as razors and precise, tough angles. This design grants the component extreme structural tension and a sense of defense, making it highly suitable for scenarios requiring rigor, precision, and deterrence, such as Network Security Monitoring, National Defense Military Screens, or Industrial Control Systems.

Tip: This component can be invoked via ScifiHeaderA2 or its semantic alias ScifiHeaderRazor.

Basic Usage

Default Form (Default)

In the default style, A2 features sharp angles converging inward. The title content is passed through the default slot.

vue
<template>
  <div class="box">
    <ScifiHeaderRazor>SECURITY CENTER</ScifiHeaderRazor>
  </div>
</template>

Appearance Variant (Decoration Alt)

A2 has excellent support for the decorationAlt property. When enabled, the decorative wings on both sides transform into a hollow line style, making it visually lighter and giving it a stronger "HUD (Head-Up Display)" feel.

vue
<template>
  <ScifiHeaderRazor :decorationAlt="true">
    HUD MODE
  </ScifiHeaderRazor>
</template>

Advanced Configuration

Flat Mode

By disabling the background gradient (gradientBackground: false) and enabling double variants (decorationAlt + decorationColorAlt), you can achieve a very clean, compact header bar suitable for embedding at the top of specific business modules.

vue
<template>
  <ScifiHeaderRazor 
    :gradientBackground="false"
    :decorationAlt="true"
    :decorationColorAlt="true"
    :scale="0.8"
  >
    Module Status
  </ScifiHeaderRazor>
</template>

Custom Styles

The component exposes a full set of CSS variables. You can easily modify the color scheme to match specific themes (such as a red warning theme) via a custom class name.

vue
<template>
  <ScifiHeaderRazor className="sfh-danger">
    WARNING
  </ScifiHeaderRazor>
</template>

<style lang="less">
.sfh-danger {
  --sf-header-bg: #4a0000;      /* Dark red background */
  --sf-header-bg_alt: #ff0000;  /* Bright red auxiliary */
  --sf-header-bd: #ff4d4f;      /* Red border */
  --sf-header-fc: #ffffff;
  --sf-header-fc_alt: #eba447;
  --sf-header-glow: #ff0000;    /* Red glow */
  --sf-header-hlite: #b81f14;
  --sf-header-focus: #eba447;
}
</style>

Cyberpunk Style

By combining reverse gradient (gradientReverse) and outer glow (glow), you can instantly create a high-contrast Cyberpunk neon texture.

vue
<template>
  <ScifiHeaderRazor 
    class="cyberpunk-style"
    :gradientReverse="true"
    :gradientBackground="false"
    :glow="true"
    :glowOpacity="0.8"
    shadowType="drop"
  >
    CYBERPUNK CITY
  </ScifiHeaderRazor>
</template>

<style lang='less'>
.cyberpunk-style{
  --sf-header-bg: #2e006b;
  --sf-header-bg_alt: #7000ff;
  --sf-header-bd: #230052;
  --sf-header-fc: #ffffff;
  --sf-header-fc_alt: #fcee0a;
  --sf-header-glow: #5fccff;
  --sf-header-hlite: #7000ff;
  --sf-header-focus: #fcee0a;
  --sf-header-shadow: #41008b;
}
</style>

API Reference

Props

Property NameDescriptionTypeDefaultA2 Feature Remarks
widthTotal header width (px). WASM will redraw paths based on this valueNumbernullSupports dynamic redrawing, maintaining sharp cutting edges.
decorationWhether to show the decorative strip at the center bottomBooleantrue
decorationAltAppearance variantBooleanfalseSignificant impact. Toggles between solid wings/hollow line wings.
decorationColorAltWhether to enable variant coloring for decorationsBooleanfalse
gradientBackgroundWhether to enable background gradient colorBooleantrue
gradientReverseWhether to reverse the direction of the background gradientBooleanfalse
glowWhether to enable SVG outer glow filterBooleanfalseWhen enabled, sharp edges transform into a neon feel.
glowOpacityOpacity of the outer glow (0-1)Number
shadowTypeShadow mode: 'drop', 't3d', 'none'String'drop'
scaleOverall component scaling ratioNumber1
classNameCustom container class nameString

Slots

Slot NameDescription
defaultTitle text content

CSS Variables

Variable NameDescriptionDefault Reference
--sf-header-lhHeader line height / Base height60px
--sf-header-ffFont FamilyImpact
--sf-header-bgMain background color (Gradient start)var(--scifi-header-bg)
--sf-header-bg_altAuxiliary background color (Gradient end)var(--scifi-header-bg_alt)
--sf-header-bgopBackground opacityvar(--cpt-header-bgop, 1)
--sf-header-bdBorder line colorvar(--scifi-bd)
--sf-header-bdwBorder line widthvar(--scifi-bdw, 1px)
--sf-header-fcMain text colorvar(--scifi-header-fc)
--sf-header-fc_altAuxiliary text / Decoration element colorvar(--scifi-header-fc_alt)
--sf-header-hliteHighlight Color.var(--scifi-header-hlite)
--sf-header-focusFocus Color.var(--scifi-header-focus)
--sf-header-glowInner glow colorvar(--scifi-hlite)
--sf-header-glowopInner glow opacityvar(--cpt-header-glowop, var(--shadow-inset-op, .5))
--sf-header-shadowContainer shadowvar(--shadow-weak)
--sf-header-scaleOverall scaling ratio (CSS level)var(--cpt-header-scale, 1)

Released under the MIT License.