Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
LangRizkie opened this issue Mar 12, 2025 · 1 comment
Open

Comments

@LangRizkie
Copy link

LangRizkie commented Mar 12, 2025

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

@mauricenaef
Copy link

Same here, would love a solution for this as it makes it very easy and dynamic to change the icon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants