Skip to main content

Themes

The ShopAR Plugin offers powerful customization capabilities. You can customize the appearance of the AR & 3D viewer to match your website's design.

CSS Customization

To change the look-and-feel of the plugin's UI, use CSS custom properties (variables). Set them on the target element or any ancestor:

#my-target-element {
/* Hide 3D loading bar */
--shopar-3d-loading-display: none;

/* Move 3D loading bar to bottom */
--shopar-3d-loading-top: auto;
--shopar-3d-loading-bottom: 0;

/* Change 3D loading bar appearance */
--shopar-3d-loading-radius: 0;
--shopar-3d-loading-fg: #f28232;
--shopar-3d-loading-bg: transparent;

/* Change 3D background */
--shopar-3d-bg: linear-gradient(to top, #1a88ff, #003e80);

/* Hide AR loading screen */
--shopar-ar-loading-container-display: none;

/* Change AR loading bar appearance */
--shopar-ar-loading-bar-radius: 0;
--shopar-ar-loading-bar-fg: #000000;
--shopar-ar-loading-bar-bg: #f0f0f0;

/* Change AR prompt appearance */
--shopar-ar-prompt-bg: #161616b2;
--shopar-ar-prompt-text-color: #f0f0f0;

/* Change QR code screen appearance */
--shopar-qr-bg: #f0f0f0;

/* ...see full reference below... */
}

3D Loading Screen

VariableDefaultDescription
--shopar-3d-loading-displayblock3D loading bar display. Set to none to hide.
--shopar-3d-loading-top03D loading bar top position.
--shopar-3d-loading-bottomauto3D loading bar bottom position.
--shopar-3d-loading-height0.375rem3D loading bar height.
--shopar-3d-loading-radiuscalc(infinity * 1px)3D loading bar border radius.
--shopar-3d-loading-fglinear-gradient(90deg, #773cd8, #5fb9ec)3D loading bar foreground (progress).
--shopar-3d-loading-bg#e5e7eb3D loading bar background.

3D Viewer

VariableDefaultDescription
--shopar-3d-bg#ffffff3D view background color.

AR Loading Screen

VariableDefaultDescription
--shopar-ar-loading-container-displayflexLoading container display. Set to none to hide.
--shopar-ar-loading-container-bg#ffffffLoading container background color.
--shopar-ar-loading-container-gap1remGap between loading elements.
--shopar-ar-loading-bar-width80%Loading bar width.
--shopar-ar-loading-bar-height0.5remLoading bar height.
--shopar-ar-loading-bar-radiuscalc(infinity * 1px)Loading bar border radius.
--shopar-ar-loading-bar-fglinear-gradient(90deg, #773cd8, #5fb9ec)Loading bar foreground (progress).
--shopar-ar-loading-bar-bg#e5e7ebLoading bar background.

AR Prompt

VariableDefaultDescription
--shopar-ar-prompt-bg#1e293bb2AR prompt background color.
--shopar-ar-prompt-gap1remGap between AR prompt elements.
--shopar-ar-prompt-text-colorwhiteAR prompt text color.
--shopar-ar-prompt-img-max-width80%AR prompt image max width.
--shopar-ar-prompt-img-max-height50%AR prompt image max height.

QR Code Screen

VariableDefaultDescription
--shopar-qr-bg#ffffffQR code container background.

Default UI

By default, the plugin renders its own UI which includes control buttons (to switch between 3D and AR) and error UI. This is useful for quick start and prototyping.

Tip: For production use, we recommend implementing a custom UI instead. This allows you to track user interactions with your own analytics and integrate the plugin seamlessly into your existing design system. See Custom UI for details.

You can customize the default UI appearance using CSS variables:

VariableDefaultDescription
--shopar-btn-container-padding-bottom2remButton container bottom padding.
--shopar-btn-container-gap0.5remGap between buttons.
--shopar-btn-padding0.5rem 0.75remButton padding.
--shopar-btn-gap0.25remGap between button icon and text.
--shopar-btn-border1px solid #ddddddButton border.
--shopar-btn-border-radiuscalc(infinity * 1px)Button border radius.
--shopar-btn-bg#ffffffButton background color.
--shopar-btn-hover-bg#f5f5f5Button hover background color.