Skip to main content

SPHHeader Documentation

img.png

HTML

<header class="sph-header">
<div class="sph-header__wrap">
<a href="">
<div class="sph-header__mast">
<img class="sph-header__logo" src="img/logo.png" alt="SPH Logo">
<h1 class="sph-header__text">SurPath Hub</h1>
</div>
</a>
<div class="sph-header__actions">
<!-- YOU CAN PUT ANYTHING HERE, THE NAVBAR COMPONENT, TRIGGERS, CUSTOM ELEMENTS, ETC -->
</div>
</div>
</header>

SCSS/CSS

CSS Classes & HTML Attributes API

ClassEffect
.sph-headerThe main header component.
.sph-header__wrapThe wrapper for all the sub elements in the header.
.sph-header__mastThe divider and wrapper for all the branding related elements in the header.
.sph-header__actionsThe divider and wrapper for all the action related elements in the header.
.sph-header__logoThe logo element in the header.
.sph-header__textThe website name in the header.

SCSS variables API (using with ())

PropertyEffect
$header-fillChanges the component's default state background color.
$header-inkChanges the component's default state text color.
$header-sizeChanges the component's text size.
$header-radiusChanges the component's border radius.
$header-elevation-colorChanges the component's elevation/shadow color.
$button-logo-widthChanges the component's logo width.
$button-logo-heightChanges the component's logo height.
@use '~@surpathhub/ugnay/SPHHeader' with (
$header-fill: black
);

@include SPHHeader.use();

CSS custom properties API

PropertyEffect
--sph-header-fillChanges the component's default state background color.
--sph-header-inkChanges the component's default state text color.
--sph-header-sizeChanges the component's text size.
--sph-header-radiusChanges the component's border radius.
--sph-button-logo-widthChanges the component's logo width.
--sph-button-logo-heightChanges the component's logo height.
.sph-header {
--sph-header-fill: blue;
--sph-header-ink: #FFF;
--sph-header-logo-height: 40px;
}