Skip to content

Styling & Customization Guide

ngx-skeleton-suite uses native CSS variables for instant live theme customization without needing recompilation:

CSS Custom Property Default Fallback Purpose
--ngx-skeleton-base-color #e2e8f0 Base background color of skeleton shapes
--ngx-skeleton-highlight-color rgba(255,255,255,0.6) Shimmer / wave gradient highlight color
--ngx-skeleton-border-radius 0.375rem Border radius applied to skeleton shapes
--ngx-skeleton-animation-duration 1.5s Wave / pulse animation speed
styles.css
:root {
--ngx-skeleton-base-color: #1e293b;
--ngx-skeleton-highlight-color: rgba(255, 255, 255, 0.15);
--ngx-skeleton-border-radius: 0px;
}

Override dimensions or shapes directly on individual directive instances:

<div *skeleton="isLoading; width: '200px'; height: '40px'; shape: 'rectangle'; borderRadius: '8px'">
<button class="submit-btn">SUBMIT ORDER</button>
</div>

Target skeleton directive wrappers using custom CSS classes:

.custom-card-skeleton {
.p-skeleton {
background-color: #0a0a0a !important;
border: 1px solid #ef4444 !important;
}
}
<div *skeleton="isLoading; styleClass: 'custom-card-skeleton'">
<div class="card">...</div>
</div>