HarryS
HarryS

Reputation: 11

Forge Viewer Autodesk

I am new to forge and desperate. I have seen this example. How can I make the Forge Toolbar transparent as shown below?

enter image description here

Upvotes: 1

Views: 252

Answers (1)

Adam Nagy
Adam Nagy

Reputation: 2175

In the picture you provided, the light-theme is used.
You can set it like this:
viewer.setTheme('light-theme');
More info: https://forge.autodesk.com/blog/dark-light-mode-viewer

The rest you can do by modifying the style of the various components. You can investigate in the browser's Developer Console what is being used by them: enter image description here

From that you can see the you can simply add the following to your own css file to override the background color and shadow of those controls:

.adsk-viewing-viewer.light-theme .adsk-control-group {
  box-shadow: none;
  background-color: transparent;
}

Here is the result:
enter image description here

Upvotes: 2

Related Questions