江边雁114 downloadsShape presets for Canvas cards: rounded, pill, ellipse, diamond, hexagon, parallelogram, star, folded note, plus the flowchart symbols used in logic diagrams (terminator, process, decision, input/output, document, database, delay).
Give Canvas cards a shape — from basic geometry to the symbols used in flowcharts and programming-logic diagrams. Stock Canvas has exactly one shape: a rectangle.
| Group | Shapes |
|---|---|
| Basic (12) | square · rounded · pill · ellipse · diamond · parallelogram · hexagon · octagon · triangle · star · cloud · folded note |
| Flowchart (12) | terminator · process · decision · input/output · predefined process · document · database · manual input · delay · annotation · preparation · connector |
The flowchart group is the standard set for programming-logic diagrams: decision as a diamond, input/output as a parallelogram, storage as a cylinder, start/end as a capsule — so you do not have to fake shapes with styled rectangles.
Rounded shapes keep their border; clipped shapes do not.
Rounded / pill / ellipse / cloud / document / database / delay are done with
border-radius, so the card's own border follows the curve and stays visible.
Diamond / hexagon / parallelogram / triangle / star / folded note are cut with
clip-path, and CSS clipping can cut a shape but cannot stroke it — a
border would need two stacked elements, which breaks Obsidian's selection box
and dragging. Not worth it.
Clipped shapes get a shape-following filter: drop-shadow() outline instead,
and turn into an accent-coloured glow when selected (the native rectangular
selection ring is clipped away, so it would otherwise be invisible).
One trap here: per the CSS spec filter is applied before clip-path, so
putting both on the same element clips the shadow away entirely. The shadow
therefore sits on the card frame, and the clipping on a layer inside it.
Text is vertically centred. Obsidian lays card text out flush to the top; on a diamond, triangle or star — shapes that are narrow at the top — that puts the text exactly where there is no room, and it gets cut in half. The cause is that Obsidian's own text block eats all the leftover height (leaving exactly one 16 px spacer above it). The plugin flips that around: the text block stops taking the slack and the two spacers split it, so the text lands in the middle of the shape. When the text is too tall to fit, the spacers shrink to zero and it simply starts at the top, so the beginning is never cropped.
Shapes are stored in the plugin's own data file, never in the .canvas.
The canvas file stays standard JSON Canvas — no private fields for other tools
or other machines to trip over. The cost: uninstalling the plugin loses the
shapes. This is the same trade-off the companion Canvas Node Align makes.
Community plugins → search for Canvas Card Shapes (after the directory
review), or copy main.js, manifest.json and styles.css into
<vault>/.obsidian/plugins/canvas-card-shapes/ and enable it in
Settings → Community plugins.
main.js shape table + menus + commands + the re-apply mechanism
styles.css one rule per shape (radius / clip-path / padding)
test/shapes.test.js 332 assertions: shape-table contract, data keys, apply/read
class names, a two-way stylesheet guard, wiring guards
test/build.test.mjs tests the release tooling itself
npm test # both test files
npm run build # the same command the community directory runs
npm run verify # metadata + build + tests
No network access, no telemetry, no reading of note contents. It does exactly two things: puts a class name on a card element, and records one line in the plugin's data file.
MIT