Theme switch button position should be configurable #10881
Open
Description
Have you read the Contributing Guidelines on issues?
- I have read the Contributing Guidelines on issues.
Description
Currently in the config file you can only either enable or disable the theme switch button through themeConfig->colorMode. But if there was an option of a navbar-item called themeSwitchButton and you could modify its position it would be good.
Example:
themeConfig: {
// Replace with your project's social card
image: 'img/docusaurus-social-card.jpg',
navbar: {
title: '',
logo: {
alt: 'Docusaurus Logo',
src: 'img/logo.svg',
srcDark: 'img/logo-dark.svg',
},
items: [
{
type: 'themeSwitchButton',
position: 'right',
},
],
},
Has this been requested on Canny?
No response
Motivation
For example if you do not mention searchbar's position it is on the right of the theme switch button. But if you specifically say left, it moves to the right of the theme switch button. This is very unintuitive in my opinion. I believe the first item on the list that says right is on the leftmost side of the items on the right. With this simple feature we have more config options for the themeSwitchButton.
API design
No response
Have you tried building it?
No response
Self-service
- I'd be willing to contribute this feature to Docusaurus myself.