Angular Skeleton Loader Component | ng-hub-ui-skeleton

Angular skeleton loading placeholders with reusable presets, inline DSL templates, responsive values and CSS variables for shimmer states.

API reference

Here's the full contract for skeleton: everything you can bind, listen to, project and theme, gathered in one place. Wire up what you need and style what you want — it's standalone and signal-friendly.

Inputs

Dial skeleton in with 7 inputs. Bind them like any Angular @Input.

NameTypeDefaultDescription
presetstring | nullnullName of a bundled or registered preset. When provided, the component resolves defaults, variants and alias composition from the preset registry.
templatestring | HubSkeletonTemplateDefinition | nullnullInline Emmet-like DSL string or template definition object with optional responsive breakpoint overrides.
paramsHubSkeletonParams{}Serializable parameters interpolated into `{{param}}` placeholders before parsing and preset expansion.
variantstring | nullnullOptional preset variant name, such as `compact`, used to switch template defaults or override the base preset template.
animatedbooleantrueEnables or disables the shimmer animation while keeping the same placeholder layout.
appearance'default' | 'subtle' | 'contrast''default'Changes the visual intensity of the skeleton surfaces without changing the resolved layout.
ariaLabelstring'Loading placeholder'Accessible label applied to the container element for assistive technologies.

Outputs

No outputs documented yet.

Templates

Make it yours — 3 template slots let you project custom markup.

NameDescriptionExample
Bundled PresetsAvailable preset names in the initial catalogue: card, list-item, table-row, detail-view, form-section, dashboard-widget, stat-card, chart-panel, profile-summary, master-detail, kanban-card, feed-item, search-result, table-toolbar, filter-bar and empty-state-skeleton.<hub-skeleton preset="table-row" [params]="{ columns: 4 }"></hub-skeleton>
Preset DSLCompact string syntax that supports node names, modifiers, sibling composition with `+`, child nesting with `>`, and repetition with `*N`.<hub-skeleton template="stack(gap:12)>circle(size:40)+stack(gap:8)>line(width:42%)+line(width:72%)"></hub-skeleton>
provideHubSkeletonPresetsRegisters custom presets in Angular dependency injection so any component can render them by name.providers: [provideHubSkeletonPresets([{ name: 'profile-card', template: 'stack(gap:16)>circle(size:72)+line(width:48%)' }])]

CSS variables

Theme every pixel with 5 CSS variables. Override them at :root or scope them to a wrapper.

Visual Tokens

Core CSS custom properties exposed by the host component.

VariableDefaultTypeDescription
--hub-skeleton-bgrgba(148, 163, 184, 0.18)color Base placeholder colour used for visible skeleton surfaces.
--hub-skeleton-highlightrgba(255, 255, 255, 0.52)color Highlight colour used by the shimmer gradient.
--hub-skeleton-radius12pxlength Default border radius for block and line nodes.
--hub-skeleton-gap12pxlength Default gap used by stack and grid nodes when not overridden by modifiers.
--hub-skeleton-animation-duration1.35stransition Duration of the shimmer animation cycle.

Styling and theming

No styling examples are documented yet. This section will include customization recipes and theming examples.