StealThis .dev

Science — Structured Abstract Card

A polished, self-contained structured abstract card for a scientific article, with labelled Background, Methods, Results and Conclusions segments, a keyword chip row, article-type and open-access badges, a DOI line, and copy actions for the abstract and an APA citation. Includes an accent left rail, peer-review badge, a smooth reveal for the conclusions section, and a toast helper, built with vanilla HTML, CSS and JavaScript only.

Open in Lab
html css vanilla-js
Targets: JS HTML

Code

Structured Abstract Card

A bordered article card that presents a structured abstract the way journals do: the prose is split into clearly labelled Background, Methods, Results, and Conclusions segments, each separated by a hairline rule. An accent left rail, an article-type badge, an open-access badge, and a peer-review badge give the card immediate scientific context, while a keyword chip row and a monospaced DOI line sit at the foot.

The card keeps things compact by default — the Conclusions segment is hidden behind a “Show conclusions” toggle that expands with a small fade animation. A primary Copy abstract button assembles the full title, authors, every segment and the DOI into plain text and writes it to the clipboard, while Copy citation produces a formatted APA reference. Clicking a keyword chip copies that term, and clicking the DOI copies its resolver link.

Everything is vanilla HTML, CSS and JavaScript with no dependencies: Source Serif 4 for prose, Inter for labels and controls, and JetBrains Mono for numbers, units and citations. A small toast() helper gives feedback on every copy action, the layout is keyboard-accessible with visible focus rings, and it reflows cleanly down to about 360px wide.

Illustrative UI only — fictional authors, data, and figures; not real scientific results.