New-udcard from new-udbutton onclick

I am trying to create a simple new udcard with new udcheck box inside on button click, but nothing seems to happen, only thing that works is udtoast and URL redirect. Is there any other way to achieve this?

Can you share the code you’ve tried so far?

Here is the code I am trying:

 New-UDButton -OnClick ( New-UDEndpoint -Endpoint {
 
    Show-UDToast -Message "Heloooooooooooooooooooo!" -MessageColor Green

        New-UDRow -Columns {
        New-UDColumn -LargeSize 12 -Content {
        New-UDCard -Size large -Endpoint { New-UDCheckbox -Id "ss" -Checked -Label "Value" } }

                        } }
                        )

Any idea how can I achieve this on above code?

Hi @afaque01,

The Card you’re generating isn’t rendering, as it has nowhere to go.
I’d reccomend checking out both New-UDElement and Set-UDElement.

New-UDElement you specify the parent, and “paste” the content as a child of the specified parent.
Set-UDElement will replace the content of the specified id with the content you’ve provided.

Give me shout if you need a full example.