Skip to content

custom_element_props_identifier warning appearing in non-custom elements #16065

@adwher

Description

@adwher

Describe the bug

I'm extending the base HTML elements by adding styles but exposing their base properties and using rest props, but since I updated from 5.32.1 to 5.33.13 the custom_element_props_identifier is showing up in all components even when I'm NOT using <svelte:options customElement /> at any part of my application. Compilation works, but is annoying to see the warning when I'm not even using that feature.

Alert on VS Code

Image

Reproduction

Alert on VS Code

Image

Component Code

<script module lang="ts">
  import { cva } from "class-variance-authority";
  import type { HTMLInputAttributes } from "svelte/elements";

  export interface InputProps extends Omit<HTMLInputAttributes, "size"> {
    /**
     * Size of the input.
     * @default "medium"
     */
    size?: "medium";

    /**
     * If `true`, the input will take up the full width of its container.
     * @default false
     */
    fullwidth?: boolean;
  }

  export const createInputStyle = cva(
    [
      "text-paragraph bg-paper transition-(shadow,colors) transition-200",
      "border border-solid border-divider",
      "outline-0 appearance-none",
      "focus:(border-violet-400 shadow-sm)",
    ],
    {
      variants: {
        size: {
          medium: ["px-3 h-10", "text-base", "rounded-md"],
        },

        fullwidth: {
          true: "w-full",
        },
      },

      defaultVariants: {
        size: "medium",
        fullwidth: false,
      },
    },
  );
</script>

<script lang="ts">
  let { size = "medium", fullwidth = false, ...props }: InputProps = $props();

  const classname = createInputStyle({ size, fullwidth, class: props.class });
</script>

<input {...props} class={classname} />

Logs

System Info

System:
    OS: macOS 15.5
    CPU: (8) arm64 Apple M1 Pro
    Memory: 268.22 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.14.0 - ~/.local/state/fnm_multishells/1409_1748734535725/bin/node
    Yarn: 1.22.22 - ~/.local/state/fnm_multishells/1409_1748734535725/bin/yarn
    npm: 10.9.2 - ~/.local/state/fnm_multishells/1409_1748734535725/bin/npm
    pnpm: 10.7.1 - ~/.local/state/fnm_multishells/1409_1748734535725/bin/pnpm
    bun: 1.2.12 - /opt/homebrew/bin/bun
  Browsers:
    Chrome: 137.0.7151.55
    Safari: 18.5
  npmPackages:
    svelte: ^5.33.13 => 5.33.13
    @sveltejs/kit: ^2.21.1 => 2.21.1
    @sveltejs/adapter-auto: ^4.0.0 => 4.0.0
    @sveltejs/vite-plugin-svelte: ^5.0.3 => 5.0.3

Severity

annoyance

Metadata

Metadata

Assignees

No one assigned

    Labels

    awaiting submitterneeds a reproduction, or clarification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions