prongs
GitHub

choice.open

Shows what is picked and opens the choices to change it: a sort order, sources. The trigger of a Popover picker

Component

Renders

<button>

Profile

Comes from

starter
Read https://www.prongs.dev/docs/intents/choice/open.md and tell me whether choice.open fits what I am building.

Example

Preview
defaultdisabled
<Action intent="choice.open" onClick={openItem}>Open</Action>

Connections

Choosing between neighbours

  • If it is

    Use

  • Shows what is picked and opens the choices to change it: a sort order, sources. The trigger of a Popover picker

    choice.open
  • One of a few options shown on the page

    choice.option
  • The button that opens it

    rather than popover.picker
    choice.open
  • Picking a sort order from a list of choices

    rather than action.sort
    choice.open

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 choice.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.select

    Looks like a form field with a chevron: a button that opens choices

    inline-flex min-w-40 cursor-pointer items-center justify-between
    gap-2 rounded-md border border-input bg-background px-3 py-2
    text-sm text-foreground transition-colors hover:bg-surface-hover
    focus-visible:outline-none focus-visible:ring-2
    focus-visible:ring-ring disabled:pointer-events-none
    disabled:opacity-50 after:text-surface-muted after:content-["▾"]
  • choice.open

    Shows what is picked and opens the choices to change it: a sort order, sources. The trigger of a Popover picker

Final classes
inline-flex min-w-40 cursor-pointer items-center justify-between
gap-2 rounded-md border border-input bg-background px-3 py-2
text-sm text-foreground transition-colors hover:bg-surface-hover
focus-visible:outline-none focus-visible:ring-2
focus-visible:ring-ring disabled:pointer-events-none
disabled:opacity-50 after:text-surface-muted after:content-["▾"]
Definition
TS
'choice.open': {
kind: 'semantic',
description: 'Shows what is picked and opens the choices to change it: a sort order, sources. The trigger of a Popover picker',
refs: ['control.select'],
notFor: [
{
context: 'one of a few options shown on the page',
instead: 'choice.option',
},
],
},