Skip to content

ScifiHeaderPhantom

WASM Powered
👑Pioneer

Scifi Header - Phantom is a stable and flat header component in the TechUI Scifi series.

It features the lowest visual center of gravity in the entire series. It utilizes a highly restrained design language of "Base Support" and "Horizontal Extension".

Visually, it discards complex vertical decorations; the geometric lines on both sides extend horizontally like stable wings, constructing a solid visual base. This low-gravity design makes it ideal for full-width headers at the bottom of a page, dividers for secondary modules, or auxiliary information display scenarios that require extreme restraint without overshadowing the main content.

Tip: This component can be invoked via ScifiHeaderA4 or its semantic alias ScifiHeaderPhantom.

Basic Usage

Default Form (Default)

The styling of A4 is very restrained, appearing like a stable tray. Title content is passed through the default slot.

vue
<template>
  <div class="box">
    <ScifiHeaderPhantom>Data Foundation</ScifiHeaderPhantom>
  </div>
</template>

Minimalist Style

By combining gradientBackground: false (disable background) and decoration: false (disable decoration), A4 can transform into a tech-style underline header, perfect as a divider for body content.

vue
<template>
  <ScifiHeaderPhantom 
    :width="600"
    :decoration="false"
    :gradientBackground="false"
    :glow="true"
  >
    Section 01
  </ScifiHeaderPhantom>
</template>

Style Switching (Reverse & ColorAlt)

Despite its low-profile design, A4 can present a striking alert state when combined with reverse gradients and variant colors, often used for warning messages in bottom status bars.

vue
<template>
  <ScifiHeaderPhantom 
    :gradientReverse="true"
    :decorationColorAlt="true"
    className="sfh-alert"
  >
    SYSTEM ALERT
  </ScifiHeaderPhantom>
</template>

Advanced Configuration

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>
  <ScifiHeaderPhantom className="sfh-danger">
    WARNING
  </ScifiHeaderPhantom>
</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>

API Reference

Props

Property NameDescriptionTypeDefaultA4 Feature Remarks
widthTotal header width (px). WASM redraws paths based on this value.NumbernullThe flat proportion remains stable across different widths.
decorationWhether to show the decorative strip at the center bottom.BooleantrueDisable to achieve a minimalist underline effect.
decorationAltAppearance variant.Booleanfalse
decorationColorAltWhether to enable variant coloring for decorations.Booleanfalse
gradientBackgroundWhether to enable background gradient color.BooleantrueRecommended to disable in auxiliary display scenarios.
gradientReverseWhether to reverse the direction of the background gradient.Booleanfalse
glowWhether to enable SVG outer glow filter.Booleanfalse
glowOpacityOpacity of the outer glow (0-1).Number
shadowTypeShadow mode: 'drop', 't3d', 'none'.String'drop'
scaleOverall component scaling ratio.Number1As A4 is flatter, it is often used with 0.6-0.8 for sub-headers.
classNameCustom container class name.String

Slots

Slot NameDescription
defaultTitle text content.

CSS Variables

Variable NameDescriptionDefault Reference
--sf-header-lhHeader line height / Base height.60px
--sf-header-ffFont Family.Impact
--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 opacity.var(--cpt-header-bgop, 1)
--sf-header-bdBorder line color.var(--scifi-bd)
--sf-header-bdwBorder line width.var(--scifi-bdw, 1px)
--sf-header-fcMain text color.var(--scifi-header-fc)
--sf-header-fc_altAuxiliary text / Decoration element color.var(--scifi-header-fc_alt)
--sf-header-hliteHighlight Color.var(--scifi-header-hlite)
--sf-header-focusFocus Color.var(--scifi-header-focus)
--sf-header-glowOuter glow color.var(--scifi-hlite)
--sf-header-glowopInner glow opacity.var(--cpt-header-glowop, var(--shadow-inset-op, .5))
--sf-header-shadowContainer shadow.var(--shadow-weak)
--sf-header-scaleOverall scaling ratio (CSS level).var(--cpt-header-scale, 1)

Released under the MIT License.