Skeleton
A placeholder while content loads.
Usage
After the one-time setup, call the helper directly from ERB. No component import is needed.
<div class="flex w-full flex-col gap-3" aria-label="Loading content" aria-busy="true">
<%= lc_skeleton class: "h-5 w-48" %>
<%= lc_skeleton class: "h-4 w-full" %>
<%= lc_skeleton class: "h-4 w-3/4" %>
</div>
Examples
Placeholder
<div class="flex w-full flex-col gap-3" aria-label="Loading content" aria-busy="true">
<%= lc_skeleton class: "h-5 w-48" %>
<%= lc_skeleton class: "h-4 w-full" %>
<%= lc_skeleton class: "h-4 w-3/4" %>
</div>
API reference
Helpers render semantic HTML and include their interaction wiring. Pass native attributes through class:, data:, aria: and the usual Rails options. Blocks use captured ERB content.
lc_skeleton
lc_skeleton(**attributes)
| Input | Default | Values |
|---|---|---|
| attributes | {} | Native HTML attributes; class:, data: and aria: merge with defaults |
Styling and extension
Use class: to merge utilities, native attributes for application behavior, and the theming guide for the shared palette. For custom markup, the advanced class helpers expose the same styles, including glass surfaces and class merging.