Skip to content
shadcn.io

shadcn.io is not affiliated with official shadcn/ui

Thread Splitting Comments Block for Solid

A drifting six-comment thread you can split: tick comments or choose Split from here in a row menu, see Stays here and New thread previews with live counts, title the new thread and undo the split.

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

Give a drifting conversation a thread of its own, with this split tool for Solid with Ark UI. It is the thread tool of Splitholt, a forum: a compact header names the thread, and one hairline frame holds the thread beside a preview. The thread is a held scroll region of six comments, each with a Checkbox, the author, the time and the words, and a row Dropdown Menu with Split from here (it ticks that comment and every one after it) and Tick only this one. The first comment starts the thread, so it shows a dash instead of a box and the menu explains why it cannot move. Beside the thread the preview shows two cells, Stays here and New thread, with their counts worked out from the ticks, a required title Input and the only Shine Button, Create thread. Creating splits the thread in place: the moved comments carry a New thread tag and an Undo puts them back. On a phone the preview sits under the thread. It is built from Checkbox, Dropdown Menu, Input, Field, Shine Button, Badge, Avatar, Button and Guides, with a CSS entrance only. For forums, support communities and any discussion that outgrows its first question.

FAQ

How do I load my own thread?

Edit THREAD: each comment has an id, the author and initials, an ISO at and the body, oldest first. The first comment is the one that starts the thread and cannot move. MIN_TITLE and MAX_TITLE bound the new title. The two preview cells list the first words of each comment, so keep bodies self-explanatory.

What does Split from here do?

It ticks the comment you chose and every comment after it, moves focus to the title field so you can name the new thread, and says how many comments it ticked. On the first comment it refuses and explains why in the status line. Tick only this one is the single-comment version. You can still add or remove ticks afterwards; the preview and its counts follow every change.

What does Create thread do?

It checks that at least one comment is ticked and that the title has enough characters; if not, it shows the problem under the field, in the status line and keeps focus in the field. Otherwise it moves the ticked comments into the New thread cell, tags them in the thread, disables the field and says nothing was posted. Undo puts them back and returns focus to the title. Splitting again is possible only after an undo, so the result is never ambiguous.

What stays local?

The ticks, the title and the split. To wire it up, post the title and the ids of the moved comments to your server from create, create the new thread there with a link back to the original, and write a note in both threads. Decide what happens to replies that quote a comment which moved.

Is it accessible?

Each box is named by the comment's author, the first comment says in words that it starts the thread, each row menu is named for its comment, and the preview cells are headed lists with their counts in the heading. The thread is a labelled scroll region reachable with Tab. Every result, refusal and undo is read from one polite status line.

How does it look on a phone?

The preview moves under the thread and the frame draws its rule between them. The thread keeps its own scroll height so the preview stays reachable, and the title field and buttons stay full width. Row menus keep a touch-sized button.