prongs
GitHub

layout.anchor

A plain box with no look that positions what sits inside it: the anchor for a badge or a menu placed over an element

Component

Renders

<div>

Profile

Comes from

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

Example

Preview

One

Two

Three

<Layout intent="layout.anchor">
…
</Layout>

Connections

Choosing between neighbours

  • If it is

    Use

  • A plain box with no look that positions what sits inside it: the anchor for a badge or a menu placed over an element

    layout.anchor
  • A visible box with a background or border

    layout.panel

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 layout.anchor 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.

  • arrange.stack

    Children in a column, free to shrink inside a row or grid

    flex min-w-0 flex-col
  • layout.anchor

    A plain box with no look that positions what sits inside it: the anchor for a badge or a menu placed over an element

    relative
Final classes
flex min-w-0 flex-col relative
Definition
TS
'layout.anchor': {
kind: 'semantic',
description: 'A plain box with no look that positions what sits inside it: the anchor for a badge or a menu placed over an element',
refs: ['arrange.stack'],
binding: { classes: 'relative' },
notFor: [
{
context: 'a visible box with a background or border',
instead: 'layout.panel',
},
],
},