storacha / w3ui

👩‍🎤 Headless, type-safe, UI components for the next generation Web3.Storage APIs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

support `as` property in headless components

travis opened this issue · comments

Similar toolkits like HeadlessUI (https://github.com/tailwindlabs/headlessui) and Plate (https://github.com/udecode/plate) support passing an as property to the components they provide that changes the root markup element of the component. I'm already finding a need for this in the work I'm doing on #224 so I'd like to dig in to supporting this.

After digging around in HeadlessUI and Plate I think it might make the most sense to use https://ariakit.org/ for this as they already have much of the functionality implemented there. We'll probably also get a host of other useful a11y features from doing this, which seems like a major win to me.