Skeleton

Skeleton indicates that the things are really happening. It is used to create a perception of reduced waiting time. Skeleton is good to when:

  • The component contains good amount of information, such as List or Card
  • There’s more than 1 element loading at the same time that requires an indicator
  • Not to use for a long-running process, e.g. importing data etc
TypeResource
DesignFigma
MobileWeb Storybook
CodeGitlab

Skeleton Preview

Usage

import id.co.biofarma.binduiandroid.components.skeleton.*
    ParagraphSkeletonPreviews(
          duration = 1500,
          easing = FastOutLinearInEasing,
          repeatMode = RepeatMode.Restart,
          textColor = Color.Black,
          angle = 0f,
          color = Color.LightGray,
    )
    ButtonSkeletonPreviews(
          duration = 1500,
          easing = FastOutLinearInEasing,
          repeatMode = RepeatMode.Restart,
          textColor = Color.Black,
          angle = 0f,
          color = Color.LightGray,
    )
    ImageSkeletonPreviews(
          duration = 1500,
          easing = FastOutLinearInEasing,
          repeatMode = RepeatMode.Restart,
          textColor = Color.Black,
          angle = 0f,
          color = Color.LightGray,
    )
      TableCellHeaderSkeletonPreviews(
          duration = 1500,
          easing = FastOutLinearInEasing,
          repeatMode = RepeatMode.Restart,
          textColor = Color.Black,
          angle = 0f,
          color = Color.LightGray,
      )
      TableCellBodySkeletonPreviews(
          duration = 1500,
          easing = FastOutLinearInEasing,
          repeatMode = RepeatMode.Restart,
          textColor = Color.Black,
          angle = 0f,
          color = Color.LightGray,
      )
      AvatarSkeletonPreviews(
          duration = 1500,
          easing = FastOutLinearInEasing,
          repeatMode = RepeatMode.Restart,
          textColor = Color.Black,
          angle = 0f,
          color = Color.LightGray,
      )
      InputFormSkeletonPreviews(
          duration = 1500,
          easing = FastOutLinearInEasing,
          repeatMode = RepeatMode.Restart,
          textColor = Color.Black,
          angle = 0f,
          color = Color.LightGray,
      )

Examples

Duration

Use duration to set animation duration for the skeleton.

Skeleton Duration

Angle (optional)

Use angle to determine angle of animation.

Angle Skeleton

Color (optional)

Use color customizing color of the skeleton.

Skeleton Color

Props

PropsRequiredDefaultTypeDescription
durationtrue-intSet duration of animation
easingtrue-EasingEasing mode for the skeleton animation.
repeatModetrue-RepeatModeRepeate mode for the animation of skeleton.
textColorfalseColor.BlackColorSet color of title above skeleton animation.
anglefalse0ffloatSet animation angle of skeleton.
colorfalseColor.LightGrayColorSet color of skeleton previews.
shimmerColorsfalsenullList<Color>?Set shimmerColors of skeleton previews.
BIND © Biofarma Innovate Next-level Design .