skeleton
Use class="skeleton" on a block element and control its size with normal CSS.
<div
style="height: 2.5rem; width: 2.5rem; border-radius: 9999px;"
class="skeleton"
></div>
Example
View source
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>AngularCSS Skeleton</title>
<link rel="stylesheet" href="../../css/preflight.css" />
<link rel="stylesheet" href="../../css/angular.css" />
<link rel="stylesheet" href="../example.css" />
<script src="../../js/angular-ts.umd.js"></script>
<script src="../../js/angular-css.umd.js"></script>
</head>
<body
ng-app="angular.css"
ng-cloak
data-example="skeleton-avatar skeleton-card skeleton-demo skeleton-form skeleton-rtl skeleton-table skeleton-text"
>
<main aria-label="Skeleton examples">
<section
class="skeleton-demo visual-example"
aria-label="Loading profile preview"
>
<output
id="labeled-skeleton"
aria-label="Loading avatar"
aria-hidden="false"
style="width: 3rem; height: 3rem; border-radius: 9999px"
class="skeleton"
></output>
<div class="skeleton-lines">
<div
id="decorative-skeleton"
aria-hidden="true"
style="width: 15.625rem; height: 1rem"
class="skeleton"
></div>
<div
aria-hidden="true"
style="width: 12.5rem; height: 1rem"
class="skeleton"
></div>
</div>
</section>
<section class="skeleton-card-demo" aria-label="Loading card">
<div class="skeleton-card-media skeleton"></div>
<div class="skeleton-line-wide skeleton"></div>
<div class="skeleton-line-medium skeleton"></div>
<div class="skeleton-button-placeholder skeleton"></div>
</section>
<section class="skeleton-form-demo" aria-label="Loading form">
<div>
<div class="skeleton-label-placeholder skeleton"></div>
<div class="skeleton-input-placeholder skeleton"></div>
</div>
<div>
<div class="skeleton-label-placeholder skeleton"></div>
<div class="skeleton-input-placeholder skeleton"></div>
</div>
<div class="skeleton-button-placeholder skeleton"></div>
</section>
<section class="skeleton-table-demo" aria-label="Loading table">
<div class="skeleton-table-heading skeleton"></div>
<div class="skeleton-table-row">
<div class="skeleton"></div>
<div class="skeleton"></div>
<div class="skeleton"></div>
</div>
<div class="skeleton-table-row">
<div class="skeleton"></div>
<div class="skeleton"></div>
<div class="skeleton"></div>
</div>
<div class="skeleton-table-row">
<div class="skeleton"></div>
<div class="skeleton"></div>
<div class="skeleton"></div>
</div>
</section>
<section class="skeleton-text-demo" aria-label="Loading text">
<div class="skeleton-line-wide skeleton"></div>
<div class="skeleton-line-wide skeleton"></div>
<div class="skeleton-line-medium skeleton"></div>
</section>
<section
class="skeleton-rtl-demo"
aria-label="تحميل الملف الشخصي"
dir="rtl"
lang="ar"
>
<div class="skeleton-avatar-placeholder skeleton"></div>
<div>
<div class="skeleton-line-wide skeleton"></div>
<div class="skeleton-line-medium skeleton"></div>
</div>
</section>
</main>
</body>
</html>
Installation
Load the AngularCSS stylesheet. This entry needs no AngularCSS JavaScript or angular.css module dependency. Add AngularTS when using application bindings such as ng-model or ng-click. See Installation for the complete setup.
This entry uses native HTML and CSS. AngularCSS registers no runtime directive for it. Authored loading placeholder.
Anatomy
Root styling selector
.skeleton
Semantic structure
Use semantic HTML with the root styling selector above. Native elements provide the structure; the stylesheet supplies presentation.
API
Attributes and state
This component has no directive-specific attributes beyond its semantic HTML.
Attributes remain authored HTML, native state, or AngularTS inputs. AngularCSS does not write element state.
CSS custom properties
This styling hook does not define component-specific CSS custom properties.
DOM events
This component does not emit a component-specific custom event.
Native DOM events continue to work normally. AngularTS event directives such as
ng-click and ng-keydown, plus the data-change model callback, remain application-owned.
Behavior
Authored loading placeholder. AngularCSS supplies styling without a runtime directive. Native HTML owns platform behavior; AngularTS owns application values, commands, and authored state.
AngularCSS does not replace AngularTS interpolation, bindings, structural directives, form controllers, validation, or application state.
Accessibility
Use the appropriate live-region or status semantics for dynamic feedback. Decorative feedback must stay hidden from assistive technology.
Authored accessible names and relationships are preserved. Test the final composition with keyboard navigation and assistive technology because labels and content come from the application.
Customization
Target semantic elements, native state selectors, and component classes with ordinary CSS. Behavior and accessible state remain with native HTML and AngularTS; visual choices belong in the application stylesheet.
Read Customization for layer order, design tokens, state variants, and iframe demo isolation.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.