Skip to content

Cannot use AlpineJS x-bind directive for required name attribute #268

@LangRizkie

Description

@LangRizkie

What version of astro-icon are you using?

v1.1.5

Astro Info

Astro                    v5.4.2
Node                     v23.8.0
System                   Windows (x64)
Package Manager          bun
Output                   server
Adapter                  @astrojs/node
Integrations             astro-auth
                         astro-icon
                         @astrojs/alpinejs

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

It give us an error

Property 'name' is missing in type

while using AlpineJS x-bind directive

What's the expected result?

We are expecting name attribute can be dynamically change based on x-data directive value like this
<Icon :name="icon" {...props} />

Link to Minimal Reproducible Example

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions