franken-ui / ui

Franken UI is an HTML-first, open-source library of UI components that works as a standalone or as a Tailwind CSS plugin. It is compatible with UIkit 3. The design is influenced by shadcn/ui.
https://franken-ui.dev
MIT License
1.78k stars 26 forks source link

uk-select `error` attribute does nothing #28

Closed BeMoreDog closed 3 weeks ago

BeMoreDog commented 1 month ago

Im using:

  <link rel="stylesheet" href="https://unpkg.com/franken-ui@1.1.0/dist/css/core.min.css" />
  <script src="https://unpkg.com/franken-ui@1.1.0/dist/js/core.iife.js" type="module"></script>
  <script src="https://unpkg.com/franken-ui@1.1.0/dist/js/icon.iife.js" type="module"></script>

and applying error to a uk-select seems to have no effect. I expected a red danger state on the select?

<uk-select error uk-cloak>
      <option value="option1">Option 1</option>
      <option value="option2">Option 2</option>
      <option value="option3">Option 3</option>
      <option value="option4">Option 4</option>
      <option value="option5">Option 5</option>
    </uk-select>
eydun commented 1 month ago

Please eloborate, why you expect that applying error to a uk-select, results in red color?

Have you read that in the docs?

Kaoschuks commented 1 month ago

I would love an answer to this also @sveltecult

BeMoreDog commented 1 month ago

Please eloborate, why you expect that applying error to a uk-select, results in red color?

Have you read that in the docs?

Yes, the docs say:

To indicate an error state in the form, simply add the error attribute. This will apply a “danger” state to the component, providing visual feedback to the user.

And unless I'm missing something no visual feedback is applied. The example in the docs has some manually (as far as I can tell) added text above and below.

Kaoschuks commented 1 month ago

I have this error only when I try to render ul-select option dynanimcally

sveltecult commented 3 weeks ago

The original shadcn design does not have red color unless you focus on that element.