Custom CSS & JavaScript

Last updated: May 22, 2026

The Custom CSS & JavaScript module lets you inject code that runs only when your website is loaded inside your app. This means you can make app-specific changes — hiding elements, tweaking styles, or adding behavior — without touching your main website at all. Visitors using a browser see the original site; users in the app see your customized version.

Custom CSS

Write standard CSS that is injected into every page inside the app.

  • Maximum length: 5000 characters

Common uses

Hide a cookie banner that is unnecessary in the app:

css
.cookie-banner {
    display: none;
}

Adjust the header to account for the native App Bar:

css
.site-header {
    display: none;
}

Override a font or spacing for a better mobile layout:

css
body {
    font-size: 16px;
    line-height: 1.6;
}

Custom JavaScript

Write standard JavaScript that runs on every page inside the app.

  • Maximum length: 5000 characters

Common uses

Show a welcome message on first load:

javascript
window.addEventListener('load', function () {
    console.log('Running inside Appilix app');
});

Modify page content for app users:

javascript
document.querySelector('.app-only-banner').style.display = 'block';

Track a custom event when a button is clicked:

javascript
document.querySelector('#subscribe-btn').addEventListener('click', function () {
    console.log('Subscribe clicked inside app');
});
Tip: Keep scripts lightweight. Avoid blocking operations or large libraries — they delay every page load inside the app. If you need to run a script only on a specific page, check the URL with window.location.href inside the script before executing.