Reference

Placeholder

Placeholder

Placeholder control. Build it with the placeholder helper.

Example

placeholder(
  content: text("Placeholder"),
  color: :blue_600,
  expand: true,
  width: 240,
  on_animation_end: ->(event) {}
)

Properties

  • color — Foreground color.
  • content — The single child control rendered inside this control.
  • fallback_height — Fallback height.
  • fallback_width — Fallback width.
  • stroke_width — Stroke width.

Plus the common layout and animation properties shared by most controls (expand, visible, disabled, opacity, width, height, align, tooltip, animate_*, …).

Events

  • on_animation_end — Fired when an animation completes.
  • on_size_change — Fired when the control's size changes.

Reference

  • Family: shared
  • Widget type: placeholder
  • Helper: placeholder