Skip to main content
Photo Sphere Viewer ships with a default dark theme. You can customize it by building the stylesheet yourself from the SCSS source and providing variable overrides.
The source files use SASS modules and must be imported with @use (not @import) in order for variable overrides to work.
// main stylesheet
@use '@photo-sphere-viewer/core/index.scss' as psv with (
  $loader-color: rgba(0, 0, 0, .5),
  $loader-width: 100px,
);

// plugin stylesheets (no variables needed for most plugins)
@use '@photo-sphere-viewer/markers-plugin/index.scss' as psvMarkers;
@use '@photo-sphere-viewer/virtual-tour-plugin/index.scss' as psvVirtualTour;
Plugin-specific SCSS variables are listed on each plugin’s documentation page.

Global

VariableDefaultDescription
$main-backgroundradial-gradient(...)Viewer background, visible when no panorama is loaded
$element-focus-outline2px solid #007cffOutline applied to focusable elements (navbar, panel, etc.)

Loader

VariableDefaultDescription
$loader-colorrgba(255, 255, 255, .7)Color of the loader bar and text
$loader-bg-colorrgba(61, 61, 61, .5)Color of the loader background
$loader-width150pxSize of the loader
$loader-tickness10pxThickness of the loader bar
$loader-border3pxInner border of the loader
$loader-font600 16px sans-serifFont of the loading text

VariableDefaultDescription
$navbar-height40pxHeight of the navbar
$navbar-backgroundrgba(61, 61, 61, .5)Background color of the navbar
$caption-font16px sans-serifFont of the caption text
$caption-text-colorrgba(255, 255, 255, .7)Text color of the caption

Buttons

VariableDefaultDescription
$buttons-height20pxInner height of the buttons
$buttons-colorrgba(255, 255, 255, .7)Icon color of the buttons
$buttons-backgroundtransparentBackground color of the buttons
$buttons-active-backgroundrgba(255, 255, 255, .2)Background color of active buttons
$buttons-disabled-opacity.5Opacity of disabled buttons
$buttons-hover-scale1.2Scale applied on mouse hover
$buttons-hover-scale-delay200msDuration of the scale animation

Zoom range

VariableDefaultDescription
$zoom-range-width80pxWidth of the zoom slider
$zoom-range-tickness1pxThickness of the zoom track
$zoom-range-diameter7pxSize of the zoom handle
$zoom-range-media-min-width600pxViewport width below which the zoom range is hidden

Tooltip

VariableDefaultDescription
$tooltip-backgroundrgba(61, 61, 61, .8)Background of tooltips
$tooltip-radius4pxBorder radius of tooltips
$tooltip-padding.5em 1emContent padding of tooltips
$tooltip-arrow-size7pxSize of the tooltip arrow
$tooltip-max-width200pxMaximum width of tooltip content
$tooltip-text-colorrgb(255, 255, 255)Text color of tooltips
$tooltip-font14px sans-serifFont of tooltips
$tooltip-text-shadow0 1px #000Shadow applied to tooltip text
$tooltip-shadow-colorrgba(90, 90, 90, .7)Color of the tooltip drop shadow
$tooltip-shadow-offset3pxSize of the tooltip drop shadow
$tooltip-animate-offset5pxDistance travelled on the show animation
$tooltip-animate-delay100msDuration of the show animation

Panel

VariableDefaultDescription
$panel-backgroundrgba(10, 10, 10, .7)Background of the side panel
$panel-width400pxDefault width of the side panel
$panel-padding1emContent padding of the side panel
$panel-text-colorrgb(220, 220, 220)Default text color in the side panel
$panel-font16px sans-serifDefault font in the side panel
$panel-animate-delay100msDuration of the show animation
VariableDefaultDescription
$panel-title-font24px sans-serifFont of the menu title
$panel-title-icon-size24pxSize of the menu title icon
$panel-title-margin24pxMargin of the menu title
$panel-menu-item-height1.5emMinimum height of a menu item
$panel-menu-item-padding.5em 1emPadding of a menu item
$panel-menu-odd-backgroundrgba(255, 255, 255, .1)Background color of odd menu items
$panel-menu-even-backgroundtransparentBackground color of even menu items
$panel-menu-hover-backgroundrgba(255, 255, 255, .2)Background color of menu items on hover

Notification

VariableDefaultDescription
$notification-position-from-$navbar-heightPosition when notification is hidden
$notification-position-to$navbar-height * 2Position when notification is visible
$notification-animate-delay200msDuration of the show animation
$notification-background$tooltip-backgroundBackground color (inherits tooltip default)
$notification-radius$tooltip-radiusBorder radius (inherits tooltip default)
$notification-padding$tooltip-paddingContent padding (inherits tooltip default)
$notification-font$tooltip-fontFont (inherits tooltip default)
$notification-text-color$tooltip-text-colorText color (inherits tooltip default)

Overlay

VariableDefaultDescription
$overlay-opacity.8Opacity of the overlay background
$overlay-icon-colorrgb(48, 48, 48)Color of the overlay icon (when SVG)
$overlay-title-font30px sans-serifFont of the overlay title
$overlay-title-colorblackColor of the overlay title
$overlay-text-font20px sans-serifFont of the overlay body text
$overlay-text-colorrgba(0, 0, 0, .8)Color of the overlay body text
$overlay-image-size50% (portrait) / 33% (landscape)Image/icon size depending on screen orientation

Build docs developers (and LLMs) love