Hierarchy

  • SvelteComponentTyped<PortalProps, PortalEvents, PortalSlots>
    • Portal

Constructors

  • Parameters

    • options: ComponentConstructorOptions<Properties<{
          target?: string | HTMLElement;
      }, {
          default: {};
      }>>

    Returns Portal

    This constructor only exists when using the asClassComponent compatibility helper, which is a stop-gap solution. Migrate towards using mount instead. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more info.

Properties

$$bindings?: string

For type checking capabilities only. Does not exist at runtime.

$$events_def: {
    [evt: string]: CustomEvent<any>;
}

For type checking capabilities only. Does not exist at runtime.

$$prop_def: {
    target?: string | HTMLElement;
}

For type checking capabilities only. Does not exist at runtime.

Type declaration

  • Optionaltarget?: string | HTMLElement

    DOM Element or CSS Selector

$$slot_def: {
    default: {};
}

For type checking capabilities only. Does not exist at runtime.

element?: {
    prototype: HTMLElement;
    new (): HTMLElement;
}

The custom element version of the component. Only present if compiled with the customElement compiler option

Methods

  • Type Parameters

    • K extends string

    Parameters

    • type: K
    • callback: ((e: CustomEvent<any>) => void)
        • (e): void
        • Parameters

          • e: CustomEvent<any>

          Returns void

    Returns (() => void)

      • (): void
      • Returns void

    This method only exists when using one of the legacy compatibility helpers, which is a stop-gap solution. See https://svelte-5-preview.vercel.app/docs/breaking-changes#components-are-no-longer-classes for more info.