Optional, dependency-free skeleton function components.
Use these inside a loading/1 to match your eventual layout and avoid layout
shift while the connected render is on its way. They render the same
lc-skeleton markup styled by priv/static/live_connected.css, so the shimmer
animation and prefers-reduced-motion handling come for free.
def loading(assigns) do
~H"<LiveConnected.Skeletons.table rows={5} cols={4} />"
endAll components are small and self-contained — keep or ignore them as you like.
Summary
Functions
A card-shaped skeleton: a title bar, a few body lines, and an optional footer.
A list-shaped skeleton: items rows, each an optional avatar plus two bars.
A table-shaped skeleton with a header row and rows × cols cells.
Functions
A card-shaped skeleton: a title bar, a few body lines, and an optional footer.
<LiveConnected.Skeletons.card lines={3} />Attributes
lines(:integer) - number of body lines to render. Defaults to3.footer(:boolean) - render a short footer bar. Defaults tofalse.class(:string) - extra classes on the wrapper. Defaults tonil.- Global attributes are accepted.
A list-shaped skeleton: items rows, each an optional avatar plus two bars.
<LiveConnected.Skeletons.list items={6} avatar />Attributes
items(:integer) - number of list items. Defaults to6.avatar(:boolean) - render a leading avatar circle. Defaults tofalse.class(:string) - extra classes on the wrapper. Defaults tonil.- Global attributes are accepted.
A table-shaped skeleton with a header row and rows × cols cells.
<LiveConnected.Skeletons.table rows={5} cols={4} />Attributes
rows(:integer) - number of body rows. Defaults to5.cols(:integer) - number of columns per row. Defaults to4.class(:string) - extra classes on the wrapper. Defaults tonil.- Global attributes are accepted.