Applies an animated shimmer effect to all child elements
while skeleton() === true. The template itself stays unchanged —
no duplicate code for the loading and content states.
Note: the host element itself must not be undefined/null
while skeleton() === true. For signals, a placeholder object
is recommended as the initial value:
post = signal({ title: '', excerpt: '', author: '' });
Exceptions in the template (keep their visual shape):
data-skeleton-round → keeps border-radius: 50% (for avatars etc.)
data-skeleton-image → keeps border-radius: 0 (for image containers)
SkeletonDirective
Applies an animated shimmer effect to all child elements while skeleton() === true. The template itself stays unchanged — no duplicate code for the loading and content states.
Note: the host element itself must not be undefined/null while skeleton() === true. For signals, a placeholder object is recommended as the initial value: post = signal({ title: '', excerpt: '', author: '' });
Exceptions in the template (keep their visual shape): data-skeleton-round → keeps border-radius: 50% (for avatars etc.) data-skeleton-image → keeps border-radius: 0 (for image containers)