Skip to content
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

Expose low-level API to use tailwind-merge logic for custom use cases #385

Open
dcastil opened this issue Mar 3, 2024 · 1 comment
Open
Labels
context-v2 Related to tailwind-merge v2 feature request

Comments

@dcastil
Copy link
Owner

dcastil commented Mar 3, 2024

There are some uses cases that are too custom for tailwind-merge to handle but that would benefit from leveraging tailwind-merge's understanding of Tailwind CSS classes and conflicts between them.

Two example use cases:

tailwind-merge could expose a low-level API that makes it possible to use its internal logic for those use cases.

Some important aspects this feature must fulfill:

  • Should not increase bundle size for the vast majority of tailwind-merge users that won't use this code
  • Should be as powerful as possible to enable as many use cases as possible
  • Should not increase package maintenance complexity too much
@dcastil dcastil added feature request context-v2 Related to tailwind-merge v2 labels Mar 3, 2024
@dcastil
Copy link
Owner Author

dcastil commented Mar 3, 2024

So far I'm thinking of a new exported function like createTailwindMergeUtils or extendTailwindMergeUtils or so that exports a bunch of util functions to get all the information that tailwind-merge uses internally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
context-v2 Related to tailwind-merge v2 feature request
Projects
None yet
Development

No branches or pull requests

1 participant