Module Skyline_chip_v2Source

Chip

A Chip is designed to highlight new or important information, such as unread messages, notifications, or status updates auxiliary to a primary UI element.

Usage

Layout behavior

Chips render as inline elements (inline-flex) and size to their contents. Use them inline with text or alongside other controls.

Example

  <Chip.view ~color:%{`Success}>Thrusters engaged</>
Sourcemodule Variant : sig ... end
Sourcemodule Color : sig ... end
Sourceval view : ?test_selector:Bonsai_web.Test_selector.t -> ?attrs:Bonsai_web.Vdom.Attr.t list -> ?size:Skyline_size.t -> ?variant:Variant.t -> ?pill:bool -> ?color:Color.t -> Bonsai_web.Vdom.Node.t list -> Bonsai_web.Vdom.Node.t

view creates a Chip

  • ?test_selector - for testing hooks (default None)
  • ?size - controls component dimensions (default `Md)
  • ?attrs - add arbitrary attributes to the chip (default None)
  • content - the content
  • ?pill - whether the chip should be pill-like in appearance (default false)
  • ?color - the Color (default `Secondary)
Sourcemodule For_docs : sig ... end