@servicenow/sdk - v4.7.0
    Preparing search index...
    interface SPTheme {
        $id: string | number | ExplicitKey<string>;
        $meta?: { installMethod?: "first install" | "demo" | "once" };
        $override?: Record<string, string | number | boolean>;
        cssIncludes?: CssIncludeWithOrder[];
        customCss?: string;
        fixedFooter?: boolean;
        fixedHeader?: boolean;
        footer?: string | Record<"sp_header_footer"> | SPHeaderFooter;
        header?: string | Record<"sp_header_footer"> | SPHeaderFooter;
        icon?: string | Image;
        jsIncludes?: JsIncludeWithOrder[];
        logo?: string | Image;
        logoAltText?: string;
        matchingNextExperienceTheme?: string | Record<"sys_ux_theme">;
        name: string;
        protectionPolicy?: "read" | "protected";
        turnOffScssCompilation?: boolean;
    }
    Index

    Properties

    $id: string | number | ExplicitKey<string>
    $meta?: { installMethod?: "first install" | "demo" | "once" }

    Type Declaration

    • OptionalinstallMethod?: "first install" | "demo" | "once"

      Map a record to an output folder that loads only in specific circumstances. 'first install' -> 'unload' (only loaded when plugin is first registered), 'demo' -> 'unload.demo' (only loaded when demo data is loaded), 'once' -> 'apply_once' (scripts that are only applied once)

    $override?: Record<string, string | number | boolean>

    Set properties not directly supported by this API.

    cssIncludes?: CssIncludeWithOrder[]

    Ordered list of CSS files (sp_css or external URLs) loaded on every page using this theme. Useful for including third-party stylesheets (e.g. custom icon fonts, vendor CSS). Rendered in ascending order value.

    customCss?: string

    SCSS variable definitions applied globally to all pages using this theme. Maps to sp_theme.css_variables. Define SCSS variables here to control theme-wide colors, fonts, and spacing (e.g. $nav-color: #333; $brand-primary: #0070d2;). Use sp-rgb() and sp-rgba() helper functions for dynamic color variable support.

    ''
    
    fixedFooter?: boolean

    Keeps the footer anchored to the bottom of the viewport as the user scrolls. Set to false to let the footer scroll with the page content.

    true
    
    fixedHeader?: boolean

    Keeps the header anchored to the top of the viewport as the user scrolls (sticky header). Set to false to let the header scroll out of view.

    true
    
    footer?: string | Record<"sp_header_footer"> | SPHeaderFooter

    Footer widget (sp_header_footer) rendered at the bottom of every portal page using this theme. Typically contains copyright, links, and secondary navigation.

    header?: string | Record<"sp_header_footer"> | SPHeaderFooter

    Header widget (sp_header_footer) rendered at the top of every portal page using this theme. Typically contains the portal logo, navigation, and search bar.

    icon?: string | Image

    Browser favicon / portal icon. Accepts a user_image sys_id string or a Now.attach('path/to/icon.png') reference for source-controlled assets.

    jsIncludes?: JsIncludeWithOrder[]

    Ordered list of JavaScript files (sys_ui_script or external URLs) loaded on every page using this theme. Useful for global scripts such as analytics or chat launchers. Rendered in ascending order value.

    logo?: string | Image

    Logo image displayed in the portal header widget. Accepts a user_image sys_id string or a Now.attach('path/to/logo.png') reference.

    logoAltText?: string

    Accessible alt text for the logo image, used by screen readers.

    matchingNextExperienceTheme?: string | Record<"sys_ux_theme">

    Links this Service Portal theme to a Next Experience (sys_ux_theme) theme for consistent branding when users switch between portal and workspace UIs. CSS variable values from the Next Experience theme are mapped into the portal theme.

    ''
    
    name: string

    Display name of the theme shown in the portal designer and theme picker (required).

    protectionPolicy?: "read" | "protected"

    Controls edit/view access for other developers after the application is installed.

    • read: Others can see the script logic but not change it.
    • protected: Others cannot change this record.
    • Omit to allow other developers to customize this record.
    turnOffScssCompilation?: boolean

    Disables server-side SCSS compilation for the customCss variable definitions. Enable this if the variables are plain CSS custom properties rather than SCSS syntax.

    false