bigardone/elm-css-placeholders/2.0.0

NOTE: the latest version is 2.0.1

Placeholders.Block

Renders a text block placeholder.

Definition

type Block

Represents the configuration for a text block placeholder. It has the following attributes:

  • backgroundColor: takes a Css.Color and represents the background color of the lines.
  • height: takes a Css.Px and represents the height of the lines.
  • items: a list of integers which is used to randomize the number of lines.

Returns a default configuration for a block placeholder.

withItems : List Int -> Block -> Block

Adds items to a Block.

Adds height to a Block.

Adds backgroundColor to a Block.

init : Block -> ( Block, Cmd Msg )

Inits a block placeholder shuffling its items.

Update

type Msg

Block msg.

update : Msg -> Block -> ( Block, Cmd Msg )

Block update.

View

view : Block -> Html msg

Renders a block placeholder using the given configuration.