OP ships a set of web components for displaying indexed content on any site.
v0.6
Related documentation
Here's what this page has sent to OP
BACKLINKS
OP ships client-side web components for displaying indexed content without writing any query logic yourself. This page demonstrates the current versions.
<octo-thorpe>
Displays pages tagged with one or more octothorpe terms. Load it from the OP server you want to query:
Upgrading from tags.js? The new component is a drop-in replacement. Both the text-content syntax (<octo-thorpe>term</octo-thorpe>) and the preload-link injection from tags.js still work — switching is a one-line script change with no markup updates required. The o attribute is available if you want render modes, filtering, or multiple terms. tags.js continues to work for sites that haven’t migrated.
Compact (default)
This mimics the original tags.js version. It displays the octothorpe with a tilted # that expands the list when clicked. Use either the text-content form or the o attribute — they’re equivalent:
Match mode: exact, fuzzy, fuzzy-o, fuzzy-s, very-fuzzy
exact
limit
Max results
10
offset
Result offset for pagination
0
when
Date filter: recent, after-DATE, before-DATE, between-DATE-and-DATE
—
render
Display mode: list, cards, compact, count
compact
autoload
Fetch on mount instead of waiting for user
false
nopreload
Skip injecting a <link rel="preload"> for the indexing endpoint
false
server
OP server to query
Origin of the script’s URL
The component automatically injects a <link rel="preload" as="fetch"> pointing at the indexing endpoint for the current page (mirroring tags.js). Set nopreload to opt out.
Accepts a MultiPass JSON object and displays results. A MultiPass is the serialized form of an OP query — you can get one from any /get/[what]/[by]/multipass endpoint:
OP ships client-side web components for displaying indexed content without writing any query logic yourself. This page demonstrates the current versions.
<octo-thorpe>Displays pages tagged with one or more octothorpe terms. Load it from the OP server you want to query:
Compact (default)
This mimics the original tags.js version. It displays the octothorpe with a tilted
#that expands the list when clicked. Use either the text-content form or theoattribute — they’re equivalent:List
Renders as a bulleted list with title, description, and date for each result.
Without
autoloadOmit
autoloadand the component renders a load button instead of fetching on mount.Count
Renders as a bare number for embedding inline.
There are pages tagged “demo”.
Multiple terms
Comma-separate terms to query pages tagged with any of them.
Cards
Attributes
osnotonotsmatchexact,fuzzy,fuzzy-o,fuzzy-s,very-fuzzyexactlimit10offset0whenrecent,after-DATE,before-DATE,between-DATE-and-DATErenderlist,cards,compact,countcompactautoloadfalsenopreload<link rel="preload">for the indexing endpointfalseserverThe component automatically injects a
<link rel="preload" as="fetch">pointing at the indexing endpoint for the current page (mirroringtags.js). Setnopreloadto opt out.CSS custom properties
<octo-backlinks>Displays pages that link back to a given URL. Load it from the OP server you want to query:
If
ois omitted, the component uses the current page’s URL as the target. Here it is live on this page:Explicit URL
Point it at any URL:
Attributes
osnotonotsmatchexact,fuzzy,fuzzy-o,fuzzy-s,very-fuzzyexactlimit10offset0whenrecent,after-DATE,before-DATE,between-DATE-and-DATErenderlist,cards,compact,countlistautoloadfalseemptyMessage"No links found to this page"server<octo-badge>Renders a clickable 88×31 badge and triggers indexing of the current page when it loads. Drop it anywhere on a registered page:
Attributes
urias"default"server<octo-multipass>Accepts a MultiPass JSON object and displays results. A MultiPass is the serialized form of an OP query — you can get one from any
/get/[what]/[by]/multipassendpoint:Pass the result to the component:
Attributes
multipassautoloadfalserenderlist,cards,compact,countlist<octo-multipass-loader>A drag-and-drop zone for MultiPass objects. Accepts a MultiPass GIF or JSON file and renders results when a file is dropped.
Attributes
placeholder"Drop MultiPass JSON or GIF here"renderlist,cards,compactlistgiftarget