Columns
Set content side by side in two or three columns that stack on phones.
Columns sets content side by side: two columns, or three, each the same
width. Below Tailwind’s sm breakpoint (yours, if you change it) they stack into one, so a phone reads them in
order. For a grid of links, use CardGrid instead.
Before
The reader opens three pages to learn which flags the command takes, then guesses at the order.
After
One page lists every flag in the order the command reads them, with a working example under each.
Usage
Each child of Columns is one column. Wrap markdown in a <div>, with blank lines inside it so mdsvex reads the markdown, to keep several
paragraphs in one column. Keep headings outside Columns: a heading belongs
to the page’s outline, and a column holds part of one section.
Pass cols={3} for three columns:
Write the page in markdown.
Preview it with live examples.
Ship it as part of the app.
A component works as a column on its own, with no <div> around it. The Do and Don’t panels are made to sit in two columns.
API reference
cols 23 default 2children required Snippet <div> to
keep several paragraphs in one column.