Skip to content

Custom Styling

There are two ways to customize the appearance of VistaView:

  1. Update CSS variables - Quick customization using existing variables
  2. Create a custom CSS file - Full theme with custom styling

The simplest way to customize VistaView is by overriding CSS variables in your own stylesheet.

custom.css
:root {
/* Colors */
--vvw-bg-color: #1a1a2e;
--vvw-text-color: #eee;
--vvw-bg-opacity: 0.95;
--vvw-bg-blur: 10px;
/* UI Colors */
--vvw-ui-outline-color: #333;
--vvw-ui-bg-color: #16213e;
--vvw-ui-text-color: #fff;
--vvw-ui-hover-bg-color: #0f3460;
--vvw-ui-active-bg-color: #e94560;
/* UI Styling */
--vvw-ui-border-radius: 12px;
--vvw-ui-border-width: 1px;
}

Import after the base styles:

import 'vistaview/style.css';
import './custom.css';

See the CSS Variables reference for all available variables.

For more control, create a complete custom theme file that includes both variable overrides and custom styling.

my-theme.css
/* Override variables */
:root {
--vvw-bg-color: #1a1a2e;
--vvw-text-color: #eee;
--vvw-ui-bg-color: #16213e;
--vvw-ui-hover-bg-color: #0f3460;
--vvw-ui-border-radius: 12px;
}
/* Custom component styling */
.vvw-ui {
&.vvw-prev,
&.vvw-next {
button {
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
&:hover {
transform: scale(1.1);
}
}
}
}
.vvw-bottom-bar,
.vvw-top-bar {
button {
transition: all 200ms ease;
&:hover {
box-shadow: 0 0 12px var(--vvw-ui-hover-bg-color);
}
}
}

Import after the base styles:

import 'vistaview/style.css';
import './my-theme.css';

VistaView detects the browser’s prefers-reduced-motion setting and automatically disables slide transitions. This happens at runtime - no CSS configuration needed.

@media (prefers-contrast: high) {
:root {
--vvw-bg-color: #000;
--vvw-text-color: #fff;
--vvw-ui-bg-color: #000;
--vvw-ui-text-color: #fff;
--vvw-ui-hover-bg-color: #333;
--vvw-ui-border-width: 2px;
}
}
GitHubnpmllms.txtContext7

© 2026 • MIT License