Skip to content
Meeko
Type to search the guides and the API reference. Open it from any page with / or Ctrl K; move with the arrow keys and open a result with Enter.
Get started

Contents

On this page

Not translated yet

This page has not been translated into English yet, so it is shown in Spanish.

PopoverTrigger

interfaz Since 1.5.0

Atributos del disparador propio de <MeekoPopover>, el parámetro trigger del snippet anchor. Cada clave es el nombre del atributo, así que el objeto sirve tal cual para bind="trigger", en un elemento o en un componente propio como <AppButton bind="trigger"> que declare esas props y las ponga en su botón. <MeekoPopover> encuentra el elemento por su id al montarse y le añade el teclado y el anclaje.

ts
import type { PopoverTrigger } from "@meekojs/meeko/framework";

Source code src/app/components/MeekoPopover/types.ts:55

Declaración #

ts
interface PopoverTrigger {
	readonly id: string
	readonly popovertarget: string | undefined
	readonly 'aria-controls': string | undefined
	readonly 'aria-expanded': 'true' | 'false' | undefined
	readonly 'aria-haspopup': 'menu' | 'dialog' | undefined
	readonly 'aria-describedby': string | undefined
}

Example #

meeko
<MeekoPopover role="menu">
  <snippet name="anchor" params="trigger">
    <button type="button" class="avatar" bind="trigger"><img src="/me.png" alt="Mi cuenta"></button>
  </snippet>
  <button role="menuitem">Perfil</button>
</MeekoPopover>

Propiedades #

id #

propiedad sólo lectura

readonly id: string

id del disparador: <MeekoPopover> lo busca con él para anclar el contenido.

popovertarget #

propiedad sólo lectura

readonly popovertarget: string | undefined

popovertarget para un <button>: abre y cierra el contenido sin JavaScript. Sin valor con mode="hint".

aria-controls #

propiedad sólo lectura

readonly 'aria-controls': string | undefined

aria-controls: el id del contenido. Sin valor con mode="hint".

aria-expanded #

propiedad sólo lectura

readonly 'aria-expanded': 'true' | 'false' | undefined

aria-expanded: "true" mientras el contenido está abierto. Sin valor con mode="hint".

aria-haspopup #

propiedad sólo lectura

readonly 'aria-haspopup': 'menu' | 'dialog' | undefined

aria-haspopup según role: "menu" o "dialog".

aria-describedby #

propiedad sólo lectura

readonly 'aria-describedby': string | undefined

aria-describedby de un tooltip (mode="hint"): el id del contenido.

Was this page helpful?

Add a comment

It is sent when you choose “Yes” or “No”. Only the page, your answer and the comment are stored: no cookies and no personal data.

0 of 2000 characters

Edit on GitHub: packages/meeko/src/app/components/MeekoPopover/types.ts