Skip to main content

SPHAppbar Documentation

appbar.png

HTML

<nav class="sc-appbar">
<div class="sc-appbar__container">
<div class="sc-appbar__item active">
<a href="">
<i class="sc-appbar__item__icon bx bxs-like" aria-hidden="true"></i>
<span class="sc-appbar__item__label">Active Label</span>
</a>
</div>
<div class="sc-appbar__item">
<a href="">
<i class="sc-appbar__item__icon bx bxs-like" aria-hidden="true"></i>
<span class="sc-appbar__item__label">Active Label</span>
</a>
</div>
<div class="sc-appbar__item">
<a href="">
<i class="sc-appbar__item__icon bx bxs-like" aria-hidden="true"></i>
<span class="sc-appbar__item__label">Active Label</span>
</a>
</div>
<div class="sc-appbar__item">
<a href="">
<i class="sc-appbar__item__icon bx bxs-like" aria-hidden="true"></i>
<span class="sc-appbar__item__label">Active Label</span>
</a>
</div>
</div>
</nav>

SCSS/CSS

CSS Classes & HTML Attributes API

ClassEffect
.sph-appbarThe main appbar component.
.sph-appbar__containerThe wrapper around the .appbar__item elements.
.sph-appbar__itemThe navigation items inside the appbar.
.sph-appbar__item__iconThe icon element of the appbar.
.sph-appbar__item__iconThe label element of the appbar.
Adding the active classRenders the appbar item in its active state.

SCSS variables API (using with ())

PropertyEffect
$appbar-fillChanges the component's default state background color.
$appbar-inkChanges the component's default state text color.
$appbar-radiusChanges the component's border radius.
$appbar-elevation-colorChanges the component's elevation/shadow color.
$appbar-active-inkChanges the component's active state text color.
$appbar-label-sizeChanges the component's label size.
$appbar-icon-sizeChanges the component's icon size.
@use '~@surpathhub/ugnay/SPHAppbar' with (
$appbar-fill: black,
$appbar-elevation-color: blue
);

@include SPHAppbar.use();

CSS custom properties API

PropertyEffect
--sph-appbar-fillChanges the component's default state background color.
--sph-appbar-inkChanges the component's default state text color.
--sph-appbar-radiusChanges the component's border radius.
--sph-appbar-active-inkChanges the component's active state text color.
--sph-appbar-label-sizeChanges the component's label size.
--sph-appbar-icon-sizeChanges the component's icon size.
.sph-appbar {
--sph-appbar-fill: blue;
--sph-appbar-active-ink: yellow;
--sph-appbar-icon-ink: #FF9900;
}