Skip to content
Back

Threaded commentsPro

Threaded comments with nested replies, reactions, @mentions, edit and delete for your own comments, agent replies, and Resolve, which folds the thread into a chip.

oxyn add threaded-comments

Hero headline

4 comments · 4 people
  • Mira Sol2h

    Can we try a shorter headline here? @Theo Park had a version that fit on one line on phones.

    • Theo Park1h

      Yes: “Plan less. Ship more.” Dropping it into the file now.

    • Docs agentAgent48m

      I checked it at 390 px: it fits on one line and saves the second line on mobile.

  • You30m

    Once this lands I'll update the social image to match. @Mira Sol can you check the click-through after?

⌘↵ to send · @ to mention
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • Review threads on a doc, design, ticket or pull request.
  • Nested replies (Thread::reply attaches anything deeper than max_depth to the deepest allowed ancestor), reactions that toggle per person, edit and delete for your own comments (delete keeps a placeholder when there are replies), @ mentions (mention_query, mention_matches, mention_spans), agent comments marked as such, and Resolve, which folds the thread into a chip.

When not to use

  • Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
  • The model menu of an AI chat: use Model Picker instead.
  • The prompt box for an agent, in six layouts: use Composer instead.

Installation

Threaded comments is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add threaded-comments

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Thread

Replies, reactions, mentions and an agent's reply.

Hero headline

4 comments · 4 people
  • Mira Sol2h

    Can we try a shorter headline here? @Theo Park had a version that fit on one line on phones.

    • Theo Park1h

      Yes: “Plan less. Ship more.” Dropping it into the file now.

    • Docs agentAgent48m

      I checked it at 390 px: it fits on one line and saves the second line on mobile.

  • You30m

    Once this lands I'll update the social image to match. @Mira Sol can you check the click-through after?

⌘↵ to send · @ to mention
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Resolved

Folded into the resolved chip.

Hero headline

4 comments · 4 people
Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Empty

No comments yet.

Hero headline

0 comments · 0 people
No comments yet. Start the thread.
    ⌘↵ to send · @ to mention
    Code Pro
    The code is part of Oxyn Pro

    The preview is free. Pro opens the code of every Pro component, screen and template.

    Get Pro

    API reference

    CommentThread

    PropTypeDefaultDescription
    threadrequiredThread—The thread.
    merequiredPerson—The person writing.
    peopleVec<Person>Default::default()People who can be mentioned (default: everyone in the thread and you).
    titleOption<String>Default::default()Header title.
    reactionsVec<String>vec!["👍".into(), "❤️".into(), "🎉".into(), "👀".into(), "🚀".into(), "✅".into()]Emoji in the picker.
    placeholderString"Add a comment…"Composer placeholder.
    max_depthusize2Deepest reply level.
    default_resolvedboolDefault::default()Starts resolved.
    on_changeEventHandler<(Thread, ThreadEvent)>—The thread changed.
    on_resolvedEventHandler<bool>—Resolved or reopened.

    Read from the Rust signature and doc comments.

    Keyboard interactions

    KeyAction
    ⌘↵orCtrlEnterSend the composer
    @Open mention suggestions
    ↑or↓Move through suggestions
    EnterorTabInsert the active mention
    EscClose suggestions, then cancel an edit or reply; closes the reaction picker and delete confirm

    Accessibility

    • The composer is a combobox with a listbox of people and aria-activedescendant.
    • Each comment is an article labelled with author and time; a deleted one reads “Deleted comment”.
    • Each reaction chip toggles, reports aria-pressed, and reads like “👍 2, including you”; reply toggles expose aria-expanded.
    From the spec
    • Composer is a combobox with a listbox of people and aria-activedescendant.
    • Each comment is an article labelled author · time; deleted reads "Deleted comment".
    • Reaction chips are toggle buttons with aria-pressed and "👍 2, including you"; reply toggles expose aria-expanded.

    Motion & interaction

    Timing
    • New comments rise in over 240 ms; reaction counts roll; picker and confirm rows slide in from the side (200 ms).
    • Reduced motion: no travel or transitions.

    Responsive behaviour

    • Below 420 px the composer hides its avatar and replies indent less (12 px); every action is a visible button on touch.
    Edge cases (spec)
    • Below 420 px the composer hides its avatar and replies indent 12 px; actions stay visible on touch.

    Notes for AI

    • Import CommentThread from oxyn_dioxus and include STATUS_INDICATOR_CSS plus the token stylesheet once.
    • A GPUI version exists: CommentThreadEl in oxyn_gpui.
    • Props to set first: thread, me.
    • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

    Guides

    Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI