How can you change SharePoint online "Change the look" using custom code instead on out of the box feature option

Mirza Hassan Baig 0 Reputation points
2024-11-20T07:28:43.3633333+00:00

I want to change SharePoint online "Change the look", using JavaScript code, instead selecting it from out of the box option.

changethelook

SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
3,071 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Yanli Jiang - MSFT 27,321 Reputation points Microsoft Vendor
    2024-11-20T09:40:40.1466667+00:00

    Hi @Mirza Hassan Baig ,

    Welcome to Q&A forum!

    Unfortunately, currently for the SharePoint Online modern experience, you cannot use JavaScript.

    This extensibility option is only available for classic SharePoint experiences. You cannot use this option with modern experiences in SharePoint Online, like with communication sites. Notice also that you should not take a dependency on the html page structure or on the out-of-the-box CSS style names as these might be adjusted without a notice.

    For your reference:

    https://learn.microsoft.com/en-us/sharepoint/dev/solution-guidance/customize-your-sharepoint-site-ui-by-using-javascript

    You can try to use SPFX. For more details, please refer to:

    https://learn.microsoft.com/en-us/sharepoint/dev/spfx/use-theme-colors-in-your-customizations

    Good day!


    If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.