Skip to content

TuiPanelTitleEave

🏅Original

TuiPanelTitleEave is a lightweight pure CSS title component within the TechUI Scifi Panel Title series.

Visually, it presents as a highlighted decorative line above the title text, covering the content like the eaves of a building. This lightweight construction requires no images or complex calculations, resulting in near-zero rendering overhead.

It is ideal for high-density data panels, small floating cards, or interface layouts pursuing a minimalist flat style. It maintains absolute interface clarity while providing the necessary visual hierarchy.

Tip: This component can be invoked via TuiPanelTitleA1 or its semantic alias TuiPanelTitleEave.

Basic Usage

Default Form

By default, A1 renders as a decorative horizontal bar above the text. The length of the bar is typically related to the text width or fixed, serving as a visual guide.

vue
<template>
  <div class="card-container">
    <TuiPanelTitleEave title="BASIC INFO" />
    
    <ScifiPanelRanger>
      <TuiPanelTitleEave 
        title="DEVICE STATUS" 
        position="left"
        :offset="20"
      />
    </ScifiPanelRanger>
  </div>
</template>

Layout and Positioning

TuiPanelTitleEave relies heavily on the position attribute to determine its location at the edge of the parent container.

Alignment (Position)

  • left: Title is displayed on the left; the decorative bar is typically in the top-left.
  • right: Title is displayed on the right; the decorative bar is typically in the top-right.
  • center: (Tui series focuses on edge decoration; specific behavior depends on CSS implementation, but left/right is recommended).

Offset Fine-tuning

Use the offset attribute to adjust the pixel distance of the title from the edge.

vue
<template>
  <TuiPanelTitleEave 
    title="CONFIGURATION" 
    position="right" 
    :offset="40" 
  />
</template>

Visual

Decoration Color Alternation (Color Alt)

  • decorationColorAlt: Swaps the highlight color and the focus color.
  • Default (False): Text uses the primary color, and the decorative bar uses the highlight color.
  • Enabled (True): Colors are swapped. The horizontal bar becomes the focus color, which can be used to indicate a "selected" or "active" state.

Font and Scale

  • fontSize / fontWeight: The Tui series supports overriding the font styles defined by CSS variables directly via Props for quick adjustments.
  • scale: Although it is a CSS component, it supports overall scaling via CSS Transform.
vue
<template>
  <TuiPanelTitleEave 
    title="WARNING" 
    fontWeight="bold"
    :fontSize="18"
    :decorationColorAlt="true"
  />
</template>

Appearance

The TuiPanelTitle series uses a CSS variable system prefixed with --tui-panti-.

Case: Cyber Purple Style

This example defines a minimalist title with purple tones.

vue
<template>
  <TuiPanelTitleEave 
    className="title-purple" 
    title="USER DATA"
  />
</template>

<style lang="less">
.title-purple {
  /* Text color */
  --tui-panti-fc: #e9d5ff; /* Light Purple */
  
  /* Decorative bar color (Highlight) */
  --tui-panti-hlite: #d8b4fe;
  
  /* Auxiliary/Focus color */
  --tui-panti-focus: #a855f7;
  
  /* Font settings */
  --tui-panti-fz: 16px;
  --tui-panti-fw: 600;
}
</style>

Variable Dictionary

Below are the primary CSS variables supported by TuiPanelTitleEave:

Variable NameDescriptionDefault Value
Text Styles
--tui-panti-fcTitle text colorvar(--font-strong)
--tui-panti-fzFont sizevar(--cpt-panti-fz)
--tui-panti-fwFont weightvar(--cpt-panti-fw)
--tui-panti-lhLine height30px
Decoration Styles
--tui-panti-hliteDecorative bar color (Highlight)var(--scifi-hlite)
--tui-panti-focusAuxiliary color (Focus)var(--scifi-focus)
--tui-panti-ofsDefault offset10px
--tui-panti-scaleComponent scale ratiovar(--cpt-panti-scale)

API Reference

Props

PropertyDescriptionTypeDefault Value
titleTitle Content. The text string to displayString
positionHorizontal Position. 'left', 'right'Stringnull
offsetEdge Offset. Pixel distance from the edgeNumber
fontSizeFont size (px). Overrides styles directlyNumber
fontWeightFont weight. e.g., 'bold'String
decorationColorAltDecorative Variant. Swaps highlight and focus colorsBooleanfalse
scaleScale Ratio. Overall scalingNumber1
classNameCustom class nameString

Slots

Slot NameDescription
defaultCustom title content.

Released under the MIT License.