Hi,
If you use kendo-theme-bootstrap for most Kendo React inputs, it results in bootstrap styling being applied to the input e.g. https://www.telerik.com/kendo-react-ui/components/dateinputs/datepicker/ or https://www.telerik.com/kendo-react-ui/components/dropdowns/combobox/. With the Bootstrap theme selected the DatePicker and Combobox have blue shadows on focus.
This is not true for the DropDrownList: https://www.telerik.com/kendo-react-ui/components/dropdowns/dropdownlist/. The border on focus does not match Bootstrap styling.
Kind regards,
David
Hi, David.
My name is Ivan and I serve as the technical lead for Kendo UI and Telerik UI for Blazor themes. Just the themes, not the components. In that role, I am more suited to answer your question.
I will first explain why we have diverged from Bootstrap and then address your qestion.
We have consciously diverged from bootstrap for reasons stemming in the difference between Kendo UI and Bootstrap:
All that goes to say that at some point in time (and that was pretty early on), we had create our own understanding of how Bootstrap applies to our components. As such, kendo-theme-bootstrap is not so much based, but rather inspired from Bootstrap.
Going back to your original questions: why the styles applied are different -- because we designed (Figma toolkit) it and implemented it based on the button component. Our logic was "If you can type in it, then it's an input and optionally shows popup; if you cannot, then it's sort of a picker and it always shows popup". The only other form component that we have that fits the purpose was a button.
Initially, that wasn't an issue, because both the inputs and buttons had white background.
However, starting with v4, things changed drastically. UX-wise, to us that was a good thing, because it now was visually apparent which component is a dropdown list and which one is autocomplete with open indicator. Still the borders were a UX mess, so we changed our shadow to better match the button and not the inputs. And the button component, in that particular state is gray and has grayish outline (shadow). The same goes for the color picker.
To sum up: we don't match bootstrap styling, not because we cannot, but because our drodown (list, tree, grid) components are based on UX concept that differentiates between form components you can type in and form components you can only choose a predefined value from.
Regards,
Ivan Zhekov
Progress Telerik
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.
Hi Vessy,
Thanks for the response. I understand that Bootstrap Dropdowns don't have the same styling as Bootstrap inputs, but that's because they are not inputs. The documentation says it is for displaying "lists of links". They are called Dropdowns but they have nothing to do with select elements. It is not a form control.
The KendoReact DropdownList is (a direct quote from your documentation) "a form component that lets you choose a single predefined value from a list and is a richer version of the <select> element and supports filtering, default items, and virtualization".
As I said, this is not an issue as we have simply overridden the styling so that it has the same appearance as other bootstrap form controls, however I do not think it is valid to present Bootstrap Dropdown styling as a reason for the lack of standard Bootstrap form control styling on your DropDownList.
Kind regards,
David
Hi, David,
Thanks a lot for the shared feedback. The linked resource shows how to style a native form `select` element, which cannot be used used for the rendering of more complex dropdowns like the DropDownList due to the filtering, virtualization, custom rendering and other functionalities available in the component. You can see the Bootstrap guidelines for styling more complex Dropdown components here:
Regards,
Vessy
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.
Hi Vessy,
I'm not sure why it matters that the DropDownList is wrapped in a non-editable span. Fundamentally it is a select input, and according to Bootstrap documentation a form select has blue shadows:
https://getbootstrap.com/docs/5.0/forms/select/
We will override the Kendo styles so it looks like a Bootstrap control, but I don't believe the current Kendo implementation is correct.
Kind regards,
David
Hi, David,
The faced behavior is expected as due to the Bootstrap standards the blue shadow is applied only to the editable input elements, while the DropDownList main wrapper is a non editable span. You can find more details about the Bootstrap style guidelines for inputs and dropdown elements in the links below:
Regards,
Vessy
Progress Telerik
Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.