Skip to content

Add data attribute invokers; fixes #246 #966

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

Merged
merged 2 commits into from
May 21, 2025
Merged

Add data attribute invokers; fixes #246 #966

merged 2 commits into from
May 21, 2025

Conversation

claviska
Copy link
Member

This is the convention we're going to use for declarative invokers.

<wa-dialog id="my-dialog">
  Dialog content
</wa-dialog>

<button data-dialog="open my-dialog">
  Open dialog
</button>

This is extensible solution to common actions that usually require JavaScript such as opening, closing, toggling, etc. so it's important to standardize it across components. (Dialog and Drawer already use this pattern.)

See #246 for more info.

@claviska claviska requested a review from lindsaym-fa May 21, 2025 12:51
@claviska claviska self-assigned this May 21, 2025
@claviska claviska added the documentation Improvements or additions to documentation label May 21, 2025
Copy link

vercel bot commented May 21, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
webawesome ✅ Ready (Inspect) Visit Preview May 21, 2025 5:38pm

@claviska claviska merged commit 39d1b82 into next May 21, 2025
2 checks passed
@claviska claviska deleted the conventions branch May 21, 2025 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants