Skip to content

Cards

A card is a colour and a list of blocks. Woosh draws it natively in every app and every theme. You choose what goes on it, its tones and its sizes; you never write styles.

var card = new Card("#f97316")
.Title("Win a monitor")
.Picture(prize, "A 27 inch monitor", PictureSize.Large)
.Text($"Entries close {Mark.Countdown(closes)}.", size: TextSize.Small)
.Field("Prize", "Monitor")
.Field("Winners", "1")
.Progress(340, 500, label: "340 entries")
.Tally("enter", "Enter", Tone.Accent)
.Link("rules", "Rules", "https://example.com/rules");
await wisp.SendAsync(channel, card);

Parts go on one at a time, in the order they show. Fields one after another share a block, and so do rows of cells, actions and pages; anything else in between starts a new block.

Part One at a time From your own data, a block at once
words Text(text, size?, tone?), Title(text), Footnote(text)
a name and its value Field("Bet", "50"), up to 10 in a block Fields(pairs)
a row of cells: boards, reels, keypads Row(Cell.Emoji("🍒"), ...), up to 5 rows of 5 Grid(rows)
a button, a menu, a tally or a link Button(action, label, tone?, value?, off?), Menu(...), Tally(...), Link(...), up to 5 in a row Actions(...)
pages, turned in the app Page("1 to 10", page => page.Text(...)), up to 10 Pages(...)
a picture, or several Picture(url, alt, size?) Gallery(pictures)
words with a picture or an action beside them Section(text, picture?, action?)
a bar Progress(value, max, label?, tone?)
space Divider()

A cell is Cell.Text(...), Cell.Emoji(...) or Cell.Picture(url, alt), and .Pressable(action, value) makes it something to press, as on a board.

Tones colour words, cells, bars and buttons: neutral, accent, good, warn and bad (Tone.Accent, or "accent"). Sizes are steps of Woosh’s own type: small, normal, large and huge (TextSize.Large, or "large"). Both look right in every theme, because Woosh draws them.

A card is a value: every builder returns a new card, so a card made in a method is a template you can build on without changing it.

static Card Machine(string reels) =>
new Card("#a855f7").Title("Your slots").Text(reels);
var won = Machine("🍒 🍒 🍒").Text("Jackpot!", tone: Tone.Good);

Words of your own make a card read like your wisp. A method on Card in your code builds on the library’s:

CasinoCards.cs
using Woosh.Wisp;
static class CasinoCards
{
public static Card Chips(this Card card, string name, int count) =>
card.Field(name, count.ToString("N0"));
}
var stats = new Card().Title("Your chips").Chips("Hands", 12).Chips("Won", 7);
Mark Shows
Mark.Bold(text), Mark.Italic(text), Mark.Code(text) bold, italic, code
Mark.User(id), Mark.Channel(id) a member or a channel, by name
Mark.Countdown(time) “in 5 minutes”, counting down in the app, at no cost to you
Mark.LocalTime(time) the time on the reader’s own clock

A line with a card carries words too, for notifications and for apps that do not draw cards. Send the card alone and Woosh writes them from the card’s words, block by block, top to bottom. Write your own when those would not say it well, as when the news is in a grid of emoji: the words first, then the card.

A card that breaks one of Woosh’s rules, such as six rows in a grid or a key used twice, throws in plain words where you built it, and costs nothing: an ArgumentException in C#, a WispRuleError in TypeScript. A card holds at most 40 parts, 4,000 characters and 8 KB. One built from your own data can outgrow that, such as a table of five players with long hands: card.Fits() (in TypeScript, fits(card)) says whether it is within the limits, so you can send a shorter one instead.

Every picture on a card is a file your wisp uploaded. Woosh never shows a picture from somewhere else, so no outside site learns who looked:

string prize = await wisp.UploadPictureAsync("monitor.webp");

PNG, JPEG, WebP or GIF (animated too), up to 2 MB each and 1 GB in all, deleted with your wisp. Upload a picture once and use its address on as many of your cards as you like; another wisp’s picture is refused, and so is a file that is not the type it says.

Edit a line to change its card for good: everyone looking sees the new one, and so does anyone who loads the channel later.

await wisp.EditAsync(line, newCard);

Change parts, not cards. Give a block or a cell a key, then send only what changed:

var line = await wisp.SendAsync(channel, new Card()
.Row(Cell.Emoji("❔").Keyed("reel-1"), Cell.Emoji("❔").Keyed("reel-2"))
.Field("Coins", "1,000").Keyed("purse"));
await wisp.EditAsync(line, "cherry, lemon", new CardPatch()
.Set("reel-1", Cell.Emoji("🍒"))
.Set("reel-2", Cell.Emoji("🍋"))
.Set("purse", card => card.Field("Coins", "950")));

Motion is a live frame. It changes the card on the screens of the people looking, and Woosh keeps nothing of it: send as many as you like, and only the newest of a burst goes out. Finish with an edit, so the card stays as it ended.

foreach (var frame in spinning)
await wisp.ShowAsync(line, frame);
await wisp.EditAsync(line, result);

For a reel that spins, an animated picture in a cell costs nothing at all once it has loaded.


Writing your own library? Every block’s keys and limits are in Cards, raw.

© 2026 Woosh AS. All rights reserved.