m3e/skeleton

Skeleton is a visual placeholder that mimics the layout of content while it’s still loading.

This file was generated by m3e/generator

     DO NOT EDIT

Types

Config is a public record for configuring this component.

pub type Config {
  Config(
    animation: skeleton_animation.SkeletonAnimation,
    shape: skeleton_shape.SkeletonShape,
    loaded: Loaded,
  )
}

Constructors

Loaded is whether the content of the skeleton has been loaded.

pub type Loaded {
  IsLoaded
  IsNotLoaded
}

Constructors

  • IsLoaded
  • IsNotLoaded

Skeleton is a View Model for this component

Fields:

  • animation: The animation effect of the skeleton.
  • shape: The shape of the skeleton.
  • loaded: Whether the content of the skeleton has been loaded.
pub opaque type Skeleton

Values

pub fn animation(
  record: Skeleton,
  animation: skeleton_animation.SkeletonAnimation,
) -> Skeleton

animation sets the value of animation for this Skeleton.

pub fn default_config() -> Config

default_config is the default configuration for this component.

pub const default_loaded: Loaded
pub fn from_config(config: Config) -> Skeleton

from_config creates a new Skeleton from the given configuration.

pub fn loaded(record: Skeleton, loaded: Loaded) -> Skeleton

loaded sets the value of loaded for this Skeleton.

pub fn new() -> Skeleton

new creates a new Skeleton with the default configuration.

pub fn render(
  model: Skeleton,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render creates a Lustre Element for a Skeleton

pub fn render_config(
  c: Config,
  attributes: List(attribute.Attribute(msg)),
  children: List(element.Element(msg)),
) -> element.Element(msg)

render_config creates a Lustre Element from a Skeleton Config

pub fn shape(
  record: Skeleton,
  shape: skeleton_shape.SkeletonShape,
) -> Skeleton

shape sets the value of shape for this Skeleton.

Search Document