Skip to content

Title 4

dvk-title-4 is a flat rail large-screen title header for command-center dashboards, city operations screens, and data visualization systems. It stays deliberately plain: straight horizontal rails, quiet inner guides, and a short bright tick at each end. The text is the first visual focus and the decoration moves aside — the center opening is measured from the title box, so a wide title pushes the rails outward and a narrow one lets them extend inward. Use it at 48–56px tall.

html
<dvk-title-4 title-text="智慧城市运行中心" style="--dvk-title-4-title-width: 260px;"></dvk-title-4>
html
<dvk-title-4 title-text="城市综合交通智能运行监测中心" style="--dvk-title-4-title-width: 380px;"></dvk-title-4>
综合态势感知平台
html
<dvk-title-4 colors="#52f0b5,#2f8cff,#b7f8ff" style="--dvk-title-4-title-width: 260px;">
  <span>综合态势感知平台</span>
</dvk-title-4>

Props

NameTypeDefaultNotes
colorstringCSS variable fallbackPrimary cyan color for the main rails, the long quiet ticks, and the title edge dots. When set as a JavaScript property, a DataV-style color array is also accepted.
secondary-colorstringCSS variable fallbackSecondary blue color for the inner soft rails.
accent-colorstringCSS variable fallbackAccent cyan color for the short bright ticks at each end of the rail pair.
colorsstringemptyComma-separated primary, secondary, and accent colors.
title-textstringemptyOptional centered system name. When omitted, the default slot is rendered inside the title area.

Events

NameDetail
dvk-ready{ tagName }

CSS Variables

NameMeaning
--dvk-color-primaryPrimary cyan fallback color.
--dvk-color-secondarySecondary blue fallback color.
--dvk-title-4-accentAccent cyan fallback color for the end ticks.
--dvk-title-4-rail-opacityOpacity of the main rails.
--dvk-title-4-accent-opacityOpacity of the short bright end ticks.
--dvk-title-4-title-widthTitle box width, never exceeding the host. When unset the box follows its own text. Wider boxes push the rails outward.
--dvk-title-4-title-gapPadding between the title text and the rail opening. Any CSS length, defaulting to 0.8em so it scales with the title font. The measured box includes it, so the rails open one gap beyond the text.
--dvk-title-4-title-colorTitle text color.
--dvk-title-4-title-fontTitle font shorthand.
--dvk-title-4-title-letter-spacingTitle letter spacing.
--dvk-title-4-title-glowSoft title text glow.

Parts

PartDescription
graphicInternal SVG.
railShared part for the horizontal rails.
main-railUpper and lower boundary rails.
soft-railQuiet inner guide rails.
accentShared part for the short end ticks.
accent-coreShort bright tick near each end.
accent-tailLonger quiet tick beside each bright tick.
edge-dotShared part for the small dot marking each side of the opening.
edge-dot-leftLeft opening dot.
edge-dot-rightRight opening dot.
contentCenter title content wrapper.
titleTitle box whose measured width sets the rail opening.
title-textGenerated title text when title-text is used.