Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Digest Email Comments Block for Svelte

A comment digest drawn as the email itself beside Daily, Weekly and Off controls and a switch per thread, with the subject and blocks worked out from typed comments.

Framework
UI library

Preview

Preview width

Installation

Part of Pro
Pro unlocks the code and one-line install of every Pro button and text effect, plus the MCP for your AI editor.
Have Pro already? Sign in to open it.Opens here as soon as you're Pro.

Overview

Show people the email before it is sent, with this digest preview for Svelte with Ark UI. The header names the preview and holds the one primary, a Shine Button that says "Send me a test". The frame has two cells. The controls cell has a Segment Group for how often (Daily, Weekly, Off) and a Switch for every thread that skips it from the email. The other cell draws the email in greyscale: the sender, a subject such as "5 threads, 7 new comments", a block for each thread with its count, the newest excerpt and a View thread line, and an unsubscribe footer. All of it is worked out from fourteen typed comments and a fixed date, so switching to Weekly brings in older comments and skipping a thread drops its block. The mail sits in a fixed-height region that scrolls, and Off or an empty digest shows a plain sentence in the same box. For community forums, issue trackers and any product that emails a summary.

FAQ

How do I fill it with my own comments?

Edit THREADS (an id and a title) and REMARKS (an id, its thread, who wrote it, an ISO at and its body). AS_OF is the fixed "now" and PERIODS holds the window of each choice in days. The subject, the counts, the blocks and the cover dates are all worked out from those, never typed.

How does the period change the email?

Daily keeps comments from the last 24 hours before the fixed date, Weekly keeps the last seven days, and Off draws no email. A thread with no comment in the window has no block, and the subject counts only what is drawn.

What does Send me a test do?

It says where the preview is and that nothing was sent. The block does not send email: the mail is a drawing. To make it real, render the same data into your email template on the server and send it through your provider from a route you control.

What stays local?

The period and the skipped threads. The status line names each change and nothing is saved. To make it real, store the period and the list of skipped threads per person and read them in the job that builds the digest.

Is it accessible?

The drawn mail is a figure with a label, its text is real text, and its body region can take focus to scroll with the keyboard. Each switch is named after its thread, the frequency control is a labelled group, and the status line is read out politely.

How does it look on a phone?

The controls come first, then the email at the full width of the panel in the same fixed height, so you can change a setting and see the result without losing your place.