Icons and links
Preview. Icons and links are implemented and may still change before the first stable release.
diagram(dir="right")
card#user(icon="user") Customer
to(web)
zone#prod(icon="cloud") Production
card#web.t2(icon="globe" href="https://example.com") Storefront
| linked card
to(db)
card#db.t1(icon="database") Orders
| PostgreSQLIcons
icon="name" draws an icon of the built-in set before the title of a card or a zone. The set is
Lucide (2,055 icons, release 1.73; the names of earlier releases still work) and 36 icons of skemo's own for infrastructure, named
skemo-… (skemo-vm, skemo-hypervisor, skemo-rack,
skemo-load-balancer, skemo-pod…), drawn the same way so that both mix. The set is embedded in
skemo: rendering stays offline and identical everywhere. Search it from the command line:
skemo icons data # database, database-backup, … (names and tags)
- A type can carry a default icon in CSS:
.store { --icon: "database"; }.icon="none"removes it on one card. - An unknown name draws nothing, reserves no space, and warns with a suggestion (
unknown-icon). - Arrows and
lilines take no icon (warningicon-ignored). - The icon takes the colour of the text it precedes;
--icon-size,--icon-colorand--icon-gaptune it.
Your own images (preview)
card#build(icon="img/docker.svg") Docker image
card#repo(icon="img/harbor.png") Harbor
An icon= value ending in .svg, .png, .jpg or .webp is an image
file, relative to the source file and inside its folder (no .., no URL). It is drawn in the icon's box, in its own
colours, and travels inside every rendered file with the source, so the image reopens with its icons (skemo extract
writes them back). An SVG is shown as an image, never inlined: its scripts and links do nothing. At most 1 MB per file. Logos
belong to their owners: use the ones you may.
Links
href="…" makes a card, a zone or an arrow clickable in the SVG and HTML outputs (raster formats are not clickable).
Accepted values: http:, https:, mailto:, a relative path (docs/fw.md) or a
fragment (#core). Any other scheme (javascript:, data:, file:…) and an empty
value are the blocking error unsafe-href.
A linked card or zone shows a small link glyph after its name, in every format, so the layout never depends on the output.
--link-mark: none hides it. External links open in a new tab in the HTML output.
