lexicon-agnostic

<atproto-lexicon-viewer>

Generic record viewer. Works with any record from any lexicon — Bluesky, custom, anything addressable by AT-URI.

<atproto-lexicon-viewer src="at://did/<nsid>/<rkey>"></atproto-lexicon-viewer>
NameTypeDefaultDescription
src * string AT-URI of any record, any lexicon.

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

PartWhat it is
article / header / type / uri / cidHeader showing the record's metadata.
treeCollapsible JSON tree of the record value.

Fetches any record from its authoring PDS via getRecord and renders the result as a collapsible JSON tree. The header shows the record's $type, AT-URI, and CID. Every object and array can be toggled open/closed. Strings, numbers, booleans, and nulls each get their own color.

Most ATProto tooling hardcodes Bluesky-specific shapes. This component does not. It renders whatever the record's JSON says — your custom com.example.recipe lexicon, a follow record, a feed generator, a starterpack, a post, anything. If the PDS returns it, this renders it.

For custom-lexicon builders, it doubles as a debug view: inspect real records on real PDSes without writing a JSON viewer or opening devtools.

  • Debug a post that looks weird on bsky.app — see what's actually in the record
  • Show off what your custom lexicon looks like in the wild
  • Explore what records a user has authored (combine with <atproto-record-list>)
  • Generate screenshots for lexicon documentation
  • <atproto-lexicon-viewer> — one record, raw JSON view.
  • <atproto-record-list> — multiple records in a collection, each rendered as a lexicon-viewer.
  • <atproto-post> — when the record is a post and you want the rendered UI, not raw JSON.