Class Card

java.lang.Object
io.mindspice.simplypages.core.HtmlTag
io.mindspice.simplypages.components.display.Card
All Implemented Interfaces:
Component

public class Card extends HtmlTag
Card container with optional header/body/footer/image slots.

Mutable and not thread-safe. Slot flags and nested slot containers are updated in place. Mutate within a request-scoped flow. For reuse, stop mutating and render as a stable structure with per-request slot/context values.

  • Constructor Details

    • Card

      public Card()
  • Method Details

    • create

      public static Card create()
    • withHeader

      public Card withHeader(String headerText)
    • withHeader

      public Card withHeader(Component headerComponent)
    • withBody

      public Card withBody(String bodyText)
    • withBody

      public Card withBody(Component bodyComponent)
    • withFooter

      public Card withFooter(String footerText)
    • withFooter

      public Card withFooter(Component footerComponent)
    • withImage

      public Card withImage(String src, String alt)
      Sets an encoded image source without Image's source policy. Supply an application-controlled or separately image-context-validated URL; encoding does not validate schemes or payloads.
    • withClass

      public Card withClass(String className)
      Description copied from class: HtmlTag
      Overrides:
      withClass in class HtmlTag
    • getChildrenStream

      protected Stream<Component> getChildrenStream()
      Description copied from class: HtmlTag
      Returns children to render, in order.

      Extension point: subclasses may override to filter/reorder children.

      Overrides:
      getChildrenStream in class HtmlTag