drop icon indicating copy to clipboard operation
drop copied to clipboard

Example without UI

Open MartijnHarmenzon opened this issue 6 years ago • 1 comments

I'm trying to implement Drop into my Tailwind CSS app. I would like to use the Tailwind CSS classes for styling and Drop for opening and closing the dropdown. I am looking for an example like Tabby where there is an option without UI. So only using the Javascript file from Tabby. Would this be possible?

Using the code below I manage to make Drop open and close the dropdown menu.

<div class="relative">
  <details class="dropdown">
    <summary>
      <button
        class="block h-8 w-8 rounded-full overflow-hidden border-2 border-gray-600 focus:outline-none focus:border-white">
        <img class="h-full w-full object-cover"
          src="https://images.unsplash.com/photo-1487412720507-e7ab37603c6f?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=256&q=80"
          alt="Your avatar">
      </button>
    </summary>
    <div class="absolute right-0 mt-2 py-2 w-48 bg-white rounded-lg shadow-xl">
      <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-indigo-500 hover:text-white">Account settings</a>
      <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-indigo-500 hover:text-white">Support</a>
      <a href="#" class="block px-4 py-2 text-gray-800 hover:bg-indigo-500 hover:text-white">Sign out</a>
    </div>
  </details>
</div>

Now I would like to remove the arrow from the details. Anny suggestion is welcome.

image

MartijnHarmenzon avatar Jan 16 '20 15:01 MartijnHarmenzon

I achieved it with some CSS.

details > summary {
  list-style: none;
}

details > summary::-webkit-details-marker {
  display: none;
}
` ``

[https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details#Customizing_the_disclosure_widget](url)

MartijnHarmenzon avatar Jan 17 '20 11:01 MartijnHarmenzon