3 ms·
this looks nice but at first glance of an example, this code is soooooo gross. <select data-select='{ "placeholder": "Select option...", "toggleT
by greenie_beans 2y ago
this looks nice but at first glance of an example, this code is soooooo gross.
<select
data-select='{
"placeholder": "Select option...",
"toggleTag": "<button type=\"button\" aria-expanded=\"false\"></button>",
"toggleClasses": "advance-select-toggle",
"dropdownClasses": "advance-select-menu",
"optionClasses": "advance-select-option selected:active",
"optionTemplate": "<div class=\"flex justify-between items-center w-full\"><span data-title></span><span class=\"icon-[tabler--check] flex-shrink-0 size-4 text-primary hidden selected:block \"></span></div>",
"extraMarkup": "<span class=\"icon-[tabler--caret-up-down] flex-shrink-0 size-4 text-base-content/90 absolute top-1/2 end-3 -translate-y-1/2 \"></span>"
}'
class="hidden"
>
https://flyonui.com/docs/advanced-forms/advanced-select/#default https://flyonui.com/docs/advanced-forms/advanced-select/#def...
i ain't doing that. nope. just give me tailwind classes in regular html so i can copy/paste.
- wg0 2y agoProbably it has been aimed at people that are horrified of Javascript. But here's the catch - having this much magic happening through this attribute soup, Javascript will bite you sooner than you think. The first few examples might go smooth but I can't see this going without any problems even in some small scale apps.
- mixmastamyk 2y agoYes, it is beautiful on the surface, but the HTML is horrendous. For example, the first component, the accordion, doesn't use summary/details tags. Though the others seem semantic enough so far. I was never one of those "separation of concerns" religion types, but the HTML is near unreadable. I'd much prefer something like picocss with a few extra utility classes—what I'm using now. This looks much nicer looking but, not worth dragging down my DX into the mud. I wish there were something this beautiful as "low class" :) or even using some custom HTML elements to eliminate boilerplate. Maybe can't happen with this because it is based on tailwind? Edit: also would like to reiterate that the dark theme needs a bit more contrast.