5 Answers, 1 is accepted
Hello,
Thank you for the example.
This can be done using the dir property of the Toolbar:
https://www.telerik.com/kendo-react-ui/components/buttons/api/ToolbarProps/#toc-dir
I have modified example as well:
https://stackblitz.com/edit/react-pns7jw-uts31s?file=app/main.jsx
Regards,
Stefan
Progress Telerik
Hi Stefan,
I only want the controls on the Toolbar to move to the right. But in the answer provided, it seems it changes the entire direction of the control which is not the intention. Please observe in the screenshot below that the dropdown arrow has shifted to left along with scrollbar which signifies that the direction of the control itself has changed. Could you provide an improved solution ?
Regards,
Vinod
Hello,
Thank you for the clarification.
I can suggest setting the following CSS to the Toolbar:
https://stackblitz.com/edit/react-pns7jw-ojtxef?file=app/main.jsx
It will also reverse the other of the items, but as the order is part of the declaration, they can just be declared in the opposite one.
Regards,
Stefan
Progress Telerik
Stefan,
What if I don't want to right align all the items on the toolbar but only some of them. In the example above, could you please show how do you display the Switch on the right on ToolBar ?
Regards,
Vinod
The Toolbar and ToolbarItem components have className prop. You can use them and style the components as you like.
About the positioning of the ToolbarItems, you can apply position relative style to the Toolbar and position absolute with left and right values to each ToolbarItem (https://developer.mozilla.org/en-US/docs/Web/CSS/position).
Regards,
Nikolay
Progress Telerik