CardAction()

Creates the action section of a card, typically used for links and buttons at the bottom of the card.

Syntax
Result = MaterialSB::CardAction(Parent = #Null)
Parameters
Parent Optional. Parent card element. If #Null, uses the current parent from the stack.
Return Value

Returns the card-action div element.

Remarks

Important: CardAction() pushes to the parent stack. You must call CloseCurrentParent() when done adding actions.

The action section is visually separated from the content section by a divider line. It's the standard location for action links, buttons, or other interactive elements.

Example
Procedure OnShare()
  MaterialSB::Toast("Shared!")
EndProcedure

Procedure OnLike()
  MaterialSB::Toast("Liked!")
EndProcedure

Procedure Main(Success)
  If Success
    MaterialSB::Row(MaterialSB::#Grid_Container)
      MaterialSB::Col(12, 6, 4)
        MaterialSB::Card()
          MaterialSB::CardContent()
            MaterialSB::CardTitle("Article Title")
            MaterialSB::Append(MaterialSB::Paragraph("This is a preview of the article content. Click below to read more or interact."))
          MaterialSB::CloseCurrentParent()
          
          ; Card action with links and buttons
          MaterialSB::CardAction()
            MaterialSB::Append(MaterialSB::Link("Read More", #Null, MaterialSB::#Color_Blue))
            MaterialSB::Button("Share", @OnShare(), MaterialSB::#Button_Text)
            MaterialSB::Button("Like", @OnLike(), MaterialSB::#Button_Text)
          MaterialSB::CloseCurrentParent()
        MaterialSB::CloseCurrentParent()
      MaterialSB::CloseCurrentParent()
    MaterialSB::CloseCurrentParent()
  EndIf
EndProcedure

MaterialSB::Download(@Main())
See Also

Card(), CardContent(), Button(), Link(), CloseCurrentParent()