Verwendung

Fade a view on entry or removal.

Dieser Typ wird verwendet von Box

tsx
// Fade a view on entry or removal.
import { Box, fade, slide, spring } from 'kuito';

<Box enter={fade.and(slide.up(12))} exit={fade} layout={spring()} />;

Typdeklaration

ts
export interface ElementHandle {
  readonly id: string;
  readonly parent: ElementHandle | null;
  readonly children: ElementHandle[];
  focus(): void;
  blur(): void;
  /** Sets a native prop on the view now, until its binding writes it again. */
  setProperty<K extends keyof ElementProperties>(key: K, value: ElementProperties[K] | null): void;
  addEventListener(
    type: string,
    fn: (e: KuitoNativeEvent) => void,
    options?: boolean | { capture?: boolean; once?: boolean; signal?: AbortSignal },
  ): void;
  removeEventListener(
    type: string,
    fn: (e: KuitoNativeEvent) => void,
    options?: boolean | { capture?: boolean },
  ): void;
  /**
   * Sends an event through the tree, capture to bubble, as a native one travels:
   * a `KuitoCustomEvent`, or any object with a `type`. False when a listener
   * called `preventDefault()` on a cancelable event.
   */
  dispatchEvent(event: { type: string; bubbles?: boolean; cancelable?: boolean }): boolean;
}

Mitglieder 9

NameTypErforderlichBeschreibung
idschreibgeschütztstringJa—
parentschreibgeschütztElementHandleJa—
childrenschreibgeschütztElementHandle[]Ja—
focus() => voidJa—
blur() => voidJa—
setProperty<K extends keyof ElementProperties>(key: K, value: ElementProperties[K] | null) => voidJaSets a native prop on the view now, until its binding writes it again.
addEventListener(type: string, fn: (e: KuitoNativeEvent) => void, options?: boolean | { capture?: boolean; once?: boolean; signal?: AbortSignal;}) => voidJa—
removeEventListener(type: string, fn: (e: KuitoNativeEvent) => void, options?: boolean | { capture?: boolean;}) => voidJa—
dispatchEvent(event: { type: string; bubbles?: boolean; cancelable?: boolean;}) => booleanJaSends an event through the tree, capture to bubble, as a native one travels: a KuitoCustomEvent, or any object with a type. False when a listener called preventDefault() on a cancelable event.
focus — Methodensignaturen

Signaturen

ts
(): void

Parameter

Keine Parameter.

Rückgabe

void

blur — Methodensignaturen

Signaturen

ts
(): void

Parameter

Keine Parameter.

Rückgabe

void

setProperty — Methodensignaturen

Signaturen

ts
<K extends keyof ElementProperties>(key: K, value: ElementProperties[K] | null): void

Typparameter

NameEinschränkungStandard
Kkeyof ElementProperties—

Parameter

NameTypErforderlichBeschreibung
keyKJa—
valueElementProperties[K]Ja—

Rückgabe

void

addEventListener — Methodensignaturen

Signaturen

ts
(type: string, fn: (e: KuitoNativeEvent) => void, options?: boolean | { capture?: boolean; once?: boolean; signal?: AbortSignal; }): void

Parameter

NameTypErforderlichBeschreibung
typestringJa—
fn(e: KuitoNativeEvent) => voidJa—
optionsboolean | { capture?: boolean; once?: boolean; signal?: AbortSignal;}Nein—

Rückgabe

void

removeEventListener — Methodensignaturen

Signaturen

ts
(type: string, fn: (e: KuitoNativeEvent) => void, options?: boolean | { capture?: boolean; }): void

Parameter

NameTypErforderlichBeschreibung
typestringJa—
fn(e: KuitoNativeEvent) => voidJa—
optionsboolean | { capture?: boolean;}Nein—

Rückgabe

void

dispatchEvent — Methodensignaturen

Signaturen

ts
(event: { type: string; bubbles?: boolean; cancelable?: boolean; }): boolean

Parameter

NameTypErforderlichBeschreibung
event{ type: string; bubbles?: boolean; cancelable?: boolean;}Ja—

Rückgabe

boolean

Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.