Skip to content

Button with dropdown #1813

Answered by saadeghi
VinceG asked this question in Q&A
Discussion options

You must be logged in to vote

Currently there's a limitation with Button group: It should join the buttons and handle their border radius but currently it can only handles border radius of direct children.
So it won't be useful if we need a to put a dropdown inside it.
This will be fixed soon in daisyUI version 3.0
But for now, you can use flex to put buttons next to each other and change the border radius of buttons accordingly:

https://play.tailwindcss.com/rY9gYnOzcz

<div class="flex items-center">
  <button class="btn rounded-r-none">Button</button>

  <div class="dropdown dropdown-end">
    <label tabindex="0" class="btn btn-square my-1 rounded-l-none">▼</label>
    <ul tabindex="0" class="dropdown-content menu p-…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by saadeghi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants