Skip to content

HTML parser lowercases tag names that collide with native HTML elements (affects Svelte/Vue) #382

Description

@tkhs0813

Feature Request

The html tagged template from @figma/code-connect/html lowercases tag names that match native HTML elements (e.g., <Select>, <Textarea>), while custom element names like <TextField> preserve their PascalCase.

For frameworks like Svelte and Vue, <Select> and <select> are semantically different — the former is a component, the latter is a native element.

Current output: <select bind:value />
Desired output: <Select bind:value />

Note: Non-native tag names like <TextField> correctly preserve PascalCase.

Use Case

We use Code Connect with parser: "html" and label: "Svelte" for our Svelte 5 design system. Components named Select and Textarea display as native HTML elements in the Dev Mode code panel, which is confusing for developers.

Environment

  • @figma/code-connect v1.4.2
  • figma.config.json: { "parser": "html", "label": "Svelte" }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions