pub struct skeleton;Expand description
A pulsing placeholder for content that is loading.
Set its dimensions through classes in attrs. Match the expected content’s shape to
reduce layout movement when it arrives. Attributes are forwarded to the <div>,
with extra classes added to its classes.
ⓘ
view! {
<div class="flex flex-col gap-2">
skeleton(attrs: attributes! { class="h-4 w-32" })
skeleton(attrs: attributes! { class="h-4 w-full" })
</div>
}Trait Implementations§
Source§impl Component for skeleton
impl Component for skeleton
Source§type Props<'__props> = SkeletonProps
type Props<'__props> = SkeletonProps
The component’s properties. The lifetime covers data borrowed from
the caller.
Source§fn render<'__a, '__props>(
self,
cx: &'__a Cx,
props: Self::Props<'__props>,
) -> impl Future<Output = Result<impl View>> + Send + '__awhere
Self: '__a,
Self::Props<'__props>: '__a,
'__props: '__a,
fn render<'__a, '__props>(
self,
cx: &'__a Cx,
props: Self::Props<'__props>,
) -> impl Future<Output = Result<impl View>> + Send + '__awhere
Self: '__a,
Self::Props<'__props>: '__a,
'__props: '__a,
fn props_builder<'a>() -> <Self::Props<'a> as Props>::Builder
Auto Trait Implementations§
impl Freeze for skeleton
impl RefUnwindSafe for skeleton
impl Send for skeleton
impl Sync for skeleton
impl Unpin for skeleton
impl UnsafeUnpin for skeleton
impl UnwindSafe for skeleton
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more