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

feat(js): introduce classNames API #317

Merged
merged 2 commits into from
Sep 11, 2020
Merged

Conversation

francoischalifour
Copy link
Member

This introduces the classNames API to autocomplete-js to append class names to each DOM element that Autocomplete creates. The name classNames was used to align with the className Web API.

This API is useful to map classnames from your website or CSS integration (e.g., Tailwind) to Autocomplete directly.

This introduces the `classNames` API to `autocomplete-js` to append class names to each DOM element that Autocomplete creates.

The name `classNames` was used to align with the [`className`](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) Web API.

This API is useful to map classnames from your website or CSS integration (e.g., Tailwind) to Autocomplete directly.
Copy link
Contributor

@Shipow Shipow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's try with a full Tailwind.css theme!

@francoischalifour francoischalifour merged commit 28bb422 into next Sep 11, 2020
@francoischalifour francoischalifour deleted the feat/js-classNames branch September 11, 2020 07:35
@eunjae-lee
Copy link
Contributor

Sorry for being late for the party, but what do you think about accepting templates as autocomplete option for fully customized markup? In order to properly use tailwind, I feel like users need to be able to touch down to the very leaf nodes.

@francoischalifour
Copy link
Member Author

@eunjae-lee
Copy link
Contributor

Oh you're right. I had a brain failure and thought that templates were INSIDE autocomplete-js. (Next step would be to discuss about customizing the templates of plugins in a separate PR)

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

Successfully merging this pull request may close these issues.

4 participants