build: 198ms run: 2ms

Text cells

As said before, a devcard is essentially a list of cells. The most basic type of a cell is a markdown cell.

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!

Devcard.Md arguments

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.

Append

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.

HTML cell

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>`)
*PURPLE TEXT*

❬ prev: Anatomy of a devcard | top: examples | next: Monospaced cells ❭