Skip to content
kerfjsGitHub

CommentAnchor

The highlighted words a comment thread hangs from.

SourcePackage @kerf-js/veneer

Preview

tsx
import { state } from '@kerf-js/core'import {  CommentAnchor,  Stack,  Text} from '@kerf-js/veneer'export function CommentAnchorText() {  const active = state<string | null>(null)  return (    <Stack gap="related">      <Text>        The cache keeps a page for{' '}        <CommentAnchor          thread="c-timeouts"          active={active}        >          60 seconds        </CommentAnchor>{' '}        after a deploy.      </Text>      <Text subtle>        {active.value          ? 'The thread is active.'          : 'Press the highlighted words.'}      </Text>    </Stack>  )}

Installation

npm install @kerf-js/veneer

Usage

tsx
import { CommentAnchor } from '@kerf-js/veneer'

Accessibility

Enter
Opens its thread
Space
Opens its thread

API Reference

PropTypeDefaultDescription
threadstring—The thread's id.
activeState<string | null>—The open thread, shared with the CommentRail.
childrenunknown—What it contains.

RelatedComment railComment thread