Custom Code

Custom Code

Custom Code lets admins inject CSS and JavaScript into the Slayte platform. Use it to extend the default appearance, embed third-party widgets, or override specific interface styles.

Open Custom Code

  1. Click nav-admin Admin in the left navigation.
  2. Click Design, then click Custom Code.

Two tabs appear. The CSS tab accepts stylesheet rules. The JavaScript tab accepts scripts that run on every page load.

Add custom CSS

Click the CSS tab and paste your stylesheet rules into the editor. Rules here override the platform's default styles. Click Save to apply. Changes take effect immediately on your next page load.

A common use is setting a custom logo via CSS when the Site Layout uploader does not give enough control over placement or sizing.

Add custom JavaScript

Click the JavaScript tab and paste your script into the editor. The script runs on every page load after the platform renders. Use this for analytics tags, chat widgets, or custom behavior scripts.

To embed a third-party widget like a support chat tool, paste the widget's embed script here. The widget loads on every page across the platform.

Example: change the navigation panel color

The following CSS targets the left navigation panel and sets it to a dark blue background.

.nav-panel { background-color: #1a2b4c !important; }
Warning
Custom CSS and JavaScript run on every page for every user. Test changes in a staging environment if possible. Errors in custom code can affect the platform for all users. Keep custom code minimal and well-commented for future maintainability.