Module Skyline_card_v2Source

Card

A Card is a generic container for grouping related content on a surface with optional elevation (border/shadow) and background color. Use it to visually separate sections of an interface and to provide a consistent padded surface for content.

Usage

Layout behavior

Cards render as block-level elements and, by default, fill the width of their container. If you need a narrower card, wrap it in a container that constrains width (e.g., with a max-width) and centers it.

Example

  {%html|
    <Skyline_card_v2.view ~elevation:%{One} ~size:%{`Md}>
      <Skyline_card_v2.Section.content>
        This is a card section.
      </>
    </>
  |}
Sourcemodule Elevation : sig ... end
Sourcemodule Surface_color : sig ... end
Sourcemodule Content : sig ... end

Opaque module reflecting content that is valid inside a view.

Sourceval view : ?test_selector:Bonsai_web.Test_selector.t -> ?attrs:Bonsai_web.Vdom.Attr.t list -> ?size:Skyline_size.t -> ?elevation:Elevation.t -> ?surface_color:Surface_color.t -> Content.t list -> Bonsai_web.Vdom.Node.t

view creates a card component. The card is just a single <div>, with some optional elevation and standard padding.

  • ?size - controls border radius and body padding
  • ?elevation - elevation level (default One)
  • ?surface_color - background color shade (default One)
Sourcemodule Section : sig ... end
Sourcemodule For_docs : sig ... end