Additional components and improvements for completeness #409
Replies: 17 comments
-
Thanks for the suggestions. About I will keep this issue open until all these components are ready. |
Beta Was this translation helpful? Give feedback.
-
Oh I see... I wasn't aware of the list of components in the [readme file], probably because it's collapsed by default. Technically speaking it doesn't matter if the open/close is done via a css class or via checkbox value as long as we can achieve the manipulation programmatically. Anyways, thanks for the heads up about the upcoming changes. We will keep an eye on them. |
Beta Was this translation helpful? Give feedback.
-
Actually regarding my last statement:
I think having the
Whereat, if we rely only on css classes, then not sure if there was a user even e.g. mouse hover, that removes or adds certain css class, how would know how to update the |
Beta Was this translation helpful? Give feedback.
-
@gjovanov The problem with checkbox is being an extra element in markup. It wouldn't be a problem with web components or react components but when it's just CSS/HTML, I think it's important to keep the markup clean as possible. An open/close functionality can be achieved using <div class="accordion-item"> and these ones will be always open/close and will ignore then <div class="accordion-item accordion-item-open">
<div class="accordion-item accordion-item-close"> I think this markup is cleaner than the current one: <li class="accordion-item">
<input id="item-foo" type="checkbox">
<label for="item-foo" class="accordion-title">
... What do you think? |
Beta Was this translation helpful? Give feedback.
-
I fully agree that that markup is cleaner with Does this mean that in case we want to programmatically manipulate the Anyways, if this is correct assumption, I think it's fine to keep the CSS clean, but it seems to me that we are just moving the complexity out of CSS to JS event handling... Either way, I'm fine with both approaches. |
Beta Was this translation helpful? Give feedback.
-
it's important that there is a way to manipulate the UI programmatically and we have that option by the cleaner CSS only variant, so it should work. Thanks for clarifying @saadeghi |
Beta Was this translation helpful? Give feedback.
-
@gjovanov This is what I have in mind:
I think this covers every scenario except this one: |
Beta Was this translation helpful? Give feedback.
-
Makes total sense @saadeghi 👍 |
Beta Was this translation helpful? Give feedback.
-
feature-request: mega menu |
Beta Was this translation helpful? Give feedback.
-
It would be great if you provide us css class of animations. For example, the animation effect of button click. If I only get that animation as a separate css class, I can apply that on other composite elements like stats. |
Beta Was this translation helpful? Give feedback.
-
@pavangayakwad This is the animation used for button click: daisyui/src/components/styled/button.css Line 202 in 6e77b42 But you can use |
Beta Was this translation helpful? Give feedback.
-
Thank you very much! |
Beta Was this translation helpful? Give feedback.
-
This is just to confirm that the dropdown stays active using oPad, iPhone and there seems to be no way to close it. Even after selection. |
Beta Was this translation helpful? Give feedback.
-
@kvetoslavnovak can you please open a new issue for this? |
Beta Was this translation helpful? Give feedback.
-
Hi, I got here looking for a way to programmatically close the dropdown once an option has been chosen. As this is an already work-in-progress feature I just wanted to share my nasty solution in case it helps anyone. You just need to set the focus into another element or use a hidden one and trigger this in the "li" click event
Thank you all for your work. |
Beta Was this translation helpful? Give feedback.
-
+1 for this feature request. |
Beta Was this translation helpful? Give feedback.
-
@KilianB But if it's just a chevron icon rotating 180deg, you won't need I'm locking this conversation. please open new thread (or issue) for new topics |
Beta Was this translation helpful? Give feedback.
-
Hey @saadeghi ,
Daisy UI is becoming really powerful set UI components.
We though that adding few more components and improvements on the existing ones, would make Daisy UI even more complete E.g.
tooltip
- we can pretty much achieve this with an absolute positioneddropdown
that opens up on mouse hover opening a panel/card etc, however not sure if it makes sense to factor it out as a separate component that can be used in combination with other components likebutton
,form-toggle
,menu
etc. here is an exampletreeview
- very similar toaccordion
with the difference that it can go in depth of multiple levels here is an exampletimeline
- this is more advanced and composite control that would have slots for its timeline items and their icons/images/avatars. here is an examplebadge
(floating or overlapping) - we already thebadge
component which great as it is. Here the idea is more to provide an example of how to place the badge in one if the upper/lower angles of e.g. abutton
oravatar
similar to this example e.g. indicating user online/offline status. Probably this can be achieved by using margins on bottom or top e.g.mb-x
. However, the idea is to show these in the examples of Daisy UI.dropdown
programmatic open/close - Currentdropdown
is really powerful option to display complex menu items. However, since, unlikeaccordion
its status (open/closed) is not mapped to anyinput
element, we haven't found a way to programmatically open or close adropdown
. Especially this is an issue if thedropdown
opens up on mouse hover and inside thedropdown menu
there is aform
component e.g.form-toggle
. In that case, if the user clicks on theform-toggle
and leaves with the mouse the menu area, the menu still remains open. So in such case it would make sense to have an option to programmatically close it. Maybe, there is a way around this, that we are not aware of...Not sure how feasible is to implement these components and improvements as CSS-only-components (without JS logic), but definitively these would make Daisy UI more complete.
Thanks for the already existing set of great UI components.
Beta Was this translation helpful? Give feedback.
All reactions