Skip to main content

ContentWithPills

Default export wraps ContentWithPillsInternal in Suspense because the inner tree calls useSearchParams.

Props (ContentWithPillsProps)​

PropRole
contentRaw post/filter string
contextIdStable key for pill tooltips and filters
isFilterBarContextInverts hashtag/mention URL mutations (remove vs add)
enableInlineFilterControlExtra inline filter affordances
isEditModePasses through to URLPill authoring controls
onHashtagClick, onMentionClick, onURLClick, onURLBehaviorChange, onURLRemoveOverride default router/searchParam behavior

Parsing​

ContentParser.parse(text) (@lib/utils/content-parsers) with strict segment precedence: structured URL pills, hashtags, mentions, then fallback URLs in residual text.

Rendering​

Segments map to InstantLink, URLPill, InteractiveTooltip, and plain spans. Filter URLs built via URLSearchParams from current pathname + searchParams (tags, author, mentions).


Sources: src/app/components/ui/ContentWithPills.tsx, @lib/utils/content-parsers, src/app/components/ui/URLPill.tsx