primitive · constellation

<atproto-gate-badge>

Inline badge indicating a post has threadgate (reply limits) or postgate (quote limits). Lexicon-agnostic — just checks whether a gate record exists.

Live post (with show-when-absent so the "open" fallback renders when no gate is set):

<atproto-gate-badge src="at://..."></atproto-gate-badge>
<atproto-gate-badge src="at://..." kind="thread"></atproto-gate-badge>
<atproto-gate-badge src="at://..." show-when-absent></atproto-gate-badge>
NameTypeDefaultDescription
src * string Post AT-URI or bsky.app URL.
kind 'any' | 'thread' | 'post' any Which gate to check. `thread` = reply limits only, `post` = quote limits only, `any` = both.
show-when-absent boolean Render a muted 'open' label when there's no gate. Default: hide entirely.
constellation string Override the Constellation endpoint.

External CSS can target these via atproto-gate-badge::part(<name>) { ... }.

PartWhat it is
badgeThe <mark> element when a gate is present.
noneMuted fallback when no gate exists.

Two collections: app.bsky.feed.threadgate (who can reply) and app.bsky.feed.postgate (who can quote). Both have .post fields pointing at the post they gate. The component queries Constellation for backlinks from either source and assembles the badge label from what it finds (reply limits / quote limits / both).

It doesn't fetch the gate records themselves — the component only knows IF a gate exists, not what its rules are. Pair with <atproto-lexicon-viewer> pointed at the gate record to see the actual rules.

<atproto-pinned-badge> — similar presence-detection mechanic for the author's pinned post.