@molecule/app-forum-thread-row-svelte
Feature · forum-thread-row · App (browser) · v1.1.4 · Apache-2.0
Discussion / forum thread row with vote score, reply count, pin/lock badges, tags
npm install @molecule/app-forum-thread-row-svelteHow it works
@molecule/app-forum-thread-row-svelte is a ready-made forum-thread-row feature for the app (browser) side. It composes the core interfaces it needs, so it works with whichever providers your app has bonded.
<script lang="ts">
import { ForumThreadRow } from '@molecule/app-forum-thread-row-svelte'
declare function openThread(): void
</script>
<ForumThreadRow
title="How do I reset my password?"
excerpt="I tried the forgot-password link but never received an email."
voteScore={42}
replyCount={7}
viewCount={320}
author="alice"
createdAt="2 hours ago"
onClick={openThread}
/>Works with: @molecule/app-svelte, @molecule/app-ui, @molecule/app-ui-svelte
Reference
Svelte forum / discussion-board thread row — the Svelte counterpart of
@molecule/app-forum-thread-row-react, with the same props and the same
DOM.
Exports ForumThreadRow — title, optional excerpt, vote score, reply/view
counts, pin/lock badges, author, timestamp, tag chips, and an optional
voteControls slot for inline up/down buttons.
Auto-generated, AI-first package reference for the molecule.dev ecosystem. It is written to be read by coding agents as much as by people, and is generated from this package's source — edit
src/index.tsJSDoc, not this file.
Quick Start
<script lang="ts">
import { ForumThreadRow } from '@molecule/app-forum-thread-row-svelte'
declare function openThread(): void
</script>
<ForumThreadRow
title="How do I reset my password?"
excerpt="I tried the forgot-password link but never received an email."
voteScore={42}
replyCount={7}
viewCount={320}
author="alice"
createdAt="2 hours ago"
onClick={openThread}
/>
Type
feature
Installation
npm install @molecule/app-forum-thread-row-svelte @molecule/app-svelte @molecule/app-ui @molecule/app-ui-svelte svelte
API
Interfaces
ForumThreadRowProps
Props for ForumThreadRow.
interface ForumThreadRowProps {
/** Thread title; a node arrives as a same-named snippet. */
title: Snippet | string
/** Optional snippet of the OP body; a node arrives as a snippet. */
excerpt?: Snippet | string
/** Aggregate vote score / upvotes. */
voteScore?: number
/** Reply count. */
replyCount?: number
/** View count. */
viewCount?: number
/** Optional pinned indicator. */
pinned?: boolean
/** Optional locked indicator. */
locked?: boolean
/** Author display; a node arrives as a snippet. */
author?: Snippet | string
/** Created-at display (relative or absolute); a node arrives as a snippet. */
createdAt?: Snippet | string
/** Tag chips; arrive as a snippet. */
tags?: Snippet | string
/** Right-side voting controls slot; arrives as a snippet. */
voteControls?: Snippet | string
/**
* Activates the row: the whole row is clickable through a transparent native
* button laid over it (Enter and Space activate it natively), named by the
* title — the `<h3>` itself takes the generated id. The `voteControls` and
* `tags` slots sit above that button and keep their own clicks.
*/
onClick?: () => void
/** Extra classes. */
className?: string
}
Constants
ForumThreadRow
const ForumThreadRow: LegacyComponentType
Injection Notes
Requirements
Peer dependencies:
@molecule/app-svelte^3.14.0 || ^4.0.0@molecule/app-ui^1.0.1@molecule/app-ui-svelte^1.1.0svelte^5.29.0
Runtime Dependencies
-
@molecule/app-svelte -
@molecule/app-ui -
@molecule/app-ui-svelte -
svelte -
Styling routes through
getClassMap()— a ClassMap bond (e.g.@molecule/app-ui-tailwind) must be wired or rendering throws. -
KNOWN GAP (same as React): the counter labels ("votes", "replies", "views") and the pin/lock aria-labels are hardcoded English (there is no companion locale bond yet). For localized apps, pass pre-formatted content via
tags/voteControlsor wrap the row until the package routes text throught(). -
The row has no
data-mol-idsupport yet; add your own wrapper attribute if AI-agent/e2e selectors need to target it. -
Node-valued props (
title,excerpt,author,createdAt,tags,voteControls) arrive as snippets; strings render as text.
Translations
Translation strings are provided by @molecule/app-locales-forum-thread-row.