build: 198ms
run: 2ms
As said before, a devcard is essentially a list of cells. The most basic type of a cell is a markdown cell.
You can add a markdown cell to a devcard with the following code:
dc.Md("I am a *markdown* **cell**!")
I am a markdown cell!
dc.Md
accepts variable number of arguments. The arguments are converted to strings and concatenated:
dc.Md("This cell is made from ", 3, " pieces.")
This cell is made from 3
pieces.
You may use dc.Append
to append one or more piece to the bottom cell of the devcard:
dc.Md("This cell")
dc.Append("is made from ", 4)
dc.Append("pieces.")
This cell is made from 4
pieces.
When markdown doesn’t cover your needs, you may drop down to an HTML cell:
dc.Html(`<div style="color: purple; font-size: 2rem;">*PURPLE TEXT*</div>`)