Skip to content

Use data attributes instead of js-* classes #125

@erolabzait

Description

@erolabzait

Hello,

Thanks for your great work, i really appreciate the Tailwind integration.

Can you consider in the future using data attributes instead of js-* classes, with Tailwind it's kind of hard to spot them.

js-slideshow -> data-cd-slideshow / data-slideshow / data-*-slideshow
js-slideshow__item -> data-cd-slideshow-item / data-slideshow-item 

Or a custom cumponent approach without shadow dom.
https://github.com/Shopify/dawn/blob/main/snippets/cart-notification.liquid
https://github.com/Shopify/dawn/blob/main/assets/cart-notification.js

<cd-slideshow>
  <div data-slideshow-item></div>
  <div data-slideshow-item></div>
  <div data-slideshow-item></div>
</cd-slideshow>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions