action.open

Opens a piece of content to read or view it: an article title, "open original", a preview

Component

Renders

<a>

Profile

Example

Preview
defaultdisabled
<Action intent="action.open" href="/somewhere">Open</Action>

Code that says open, read, view, preview, original points here. prongs check warns when an element with this intent has a handler or label that points somewhere else.

Choosing between neighbours

Find the row that describes your element, and use the intent on the right.

  • If it is

    Use

  • Opens a piece of content to read or view it: an article title, "open original", a preview

    action.open this page
  • Going to another page of this site

    action.navigate
  • A link to read a piece of content

    rather than action.inspect
    action.open this page

Connections

Declared in the registry, both directions. Where an intent is used in your own code is something check and the gallery see; this site has no app code.

For registry authors

Starter intents. These are the intents prongs add puts in your registry, shown in this site’s theme. Yours are your own registry.ts: rename, restyle and add to them, and see them with prongs add gallery.

What this intent is built from and its entry in components/prongs/registry.ts. You only need this to change how it looks or to add an intent like it.

How action.open resolves, and its definition

Each layer adds to the one before it; a later class wins over an earlier one that sets the same thing.

  • control.link

    Inline text link

    text-foreground underline decoration-dotted
    decoration-foreground/50 underline-offset-4
    hover:decoration-foreground focus-visible:decoration-solid
    focus-visible:decoration-2 focus-visible:outline-none
    aria-disabled:pointer-events-none aria-disabled:opacity-50
  • action.open

    Opens a piece of content to read or view it: an article title, "open original", a preview

Final classes
text-foreground underline decoration-dotted
decoration-foreground/50 underline-offset-4
hover:decoration-foreground focus-visible:decoration-solid
focus-visible:decoration-2 focus-visible:outline-none
aria-disabled:pointer-events-none aria-disabled:opacity-50
Definition
TS
'action.open': {
kind: 'semantic',
description: 'Opens a piece of content to read or view it: an article title, "open original", a preview',
refs: ['control.link'],
keywords: ['open', 'read', 'view', 'preview', 'original'],
notFor: [
{
context: 'going to another page of this site',
instead: 'action.navigate',
},
],
},