BrandLoader
Sized Instances (--brand-loader-width / --brand-loader-height)
--loader-width/--loader-height are also independently read by the Loader component (with a 20px default there, vs 100vw/100vh here). The namespaced --brand-loader-width/--brand-loader-height variables are the collision-free,
preferred way to size a constrained instance; the legacy shared names still work as a fallback for existing
overrides.
Legacy: --loader-width / --loader-height
Preferred: --brand-loader-width / --brand-loader-height
Both set: namespaced wins
Documentation
A full-screen loading screen that displays a brand logo image, main text, optional subtext, and an animated bouncing ellipsis spinner. Uses backdrop-filter blur for a frosted-glass visual effect. Ideal for app loading / splash screens.
The frosted overlay (--loader-background-color) is only ~20% opaque, so its painted colour is mostly whatever sits behind it. With zero overrides that is a light host page, so the default text colours are dark for legibility there.
Usage
<script>
import { BrandLoader } from '@juspay/svelte-ui-components';
</script>
<BrandLoader brandLogoURL="https://example.com/logo.svg" brandText="Loading..." />
Over dark imagery
The classic "frosted glass over a photo/video" look needs light text. Override the two text-colour tokens to get it back:
<BrandLoader
brandLogoURL="https://example.com/logo.svg"
brandText="Loading..."
classes="brand-loader-on-dark"
/>
<style>
.brand-loader-on-dark {
--loader-text-color: white;
--loader-sub-text-color: #d4d4d8;
}
</style>
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
| brandLogoURL | string |
Yes | - |
URL of the brand logo image displayed at the center. |
| brandText | string |
Yes | - |
Main text displayed below the logo (e.g., brand name or loading message). |
| subText | string | null |
No | - |
Optional smaller text displayed below the main text. |
| testId | string |
No | - |
Value for the data-pw attribute on the root element, used for end-to-end testing selectors. |
| classes | string |
No | - |
CSS class string applied to the component's top-level element. Useful for theming — define classes with CSS variable overrides (e.g., .btn-primary { --button-color: #0070f3; }) and pass them to create variant styles. |
CSS Variables
Override these custom properties to theme the component.
| Variable | Default | CSS Property | Description |
|---|---|---|---|
--loader-background-height |
- |
height | Height of the background container. |
--loader-background-width |
- |
width | Width of the background container. |
--loader-background-border-radius |
0px |
border-radius | Corner rounding of the background container. |
--loader-height |
100vh |
height | Height of the full loader screen. Deprecated — use --brand-loader-height instead (both names are supported for backward compatibility). Also independently read by the unrelated Loader component with a different default (20px) — setting this name in a scope containing both components resizes both. |
--loader-width |
100vw |
width | Width of the full loader screen. Deprecated — use --brand-loader-width instead (both names are supported for backward compatibility). Also independently read by the unrelated Loader component with a different default (20px) — setting this name in a scope containing both components resizes both. |
--brand-loader-height |
100vh |
height | Height of the full loader screen. Preferred name (supersedes --loader-height); does not collide with Loader's own use of --loader-height. |
--brand-loader-width |
100vw |
width | Width of the full loader screen. Preferred name (supersedes --loader-width); does not collide with Loader's own use of --loader-width. |
--loader-justify-content |
center |
justify-content | Horizontal alignment of loader content. |
--loader-align-items |
center |
align-items | Vertical alignment of loader content. |
--loader-flex-direction |
column |
flex-direction | Layout direction of loader content. |
--loader-img-height |
40px |
height | Height of the brand logo image. |
--loader-img-width |
71px |
width | Width of the brand logo image. |
--loader-text-font-size |
22px |
font-size | Font size of the brand text. |
--loader-text-padding |
16px 0px |
padding | Padding around the brand text. |
--loader-text-color |
#333333 |
color | Color of the brand text. Tuned to read on the default light-backdrop use case; set to white (see "Over dark imagery" above) for the frosted-glass-over-imagery look. |
--loader-text-font |
inherit |
font-family | Font family of the brand text. |
--loader-sub-text-font-size |
12px |
font-size | Font size of the subtext. |
--loader-sub-text-margin |
16px |
margin | Margin around the subtext. |
--loader-sub-text-color |
#52525b |
color | Color of the subtext. Tuned to read on the default light-backdrop use case; override alongside --loader-text-color for the over-dark-imagery look. |
--loader-background-color |
#ffffff33 |
background-color | Background color of the frosted-glass overlay. |
--loader-ellipsis-display |
inline-block |
display | Display mode of the bouncing dots container. |
--loader-ellipsis-position |
relative |
position | CSS position of the bouncing dots container. |
--loader-ellipsis-width |
80px |
width | Width of the bouncing dots container. |
--loader-ellipsis-height |
80px |
height | Height of the bouncing dots container. |
--loader-ellipsis-div-display |
inherit |
display | Display mode of each bouncing dot. |
--loader-ellipsis-div-position |
absolute |
position | CSS position of each bouncing dot. |
--loader-ellipsis-div-top |
5px |
top | Top offset of each bouncing dot. |
--loader-ellipsis-div-width |
13px |
width | Width of each bouncing dot. |
--loader-ellipsis-div-height |
13px |
height | Height of each bouncing dot. |
--loader-ellipsis-div-border-radius |
50% |
border-radius | Corner rounding of each bouncing dot. |
--loader-dot-color |
#3a4550 |
background | Background color of the bouncing dots. |
--loader-ellipsis-animation-timing |
cubic-bezier(0, 1, 1, 0) |
animation-timing-function | Animation timing function for the bouncing dots. |
--loader-webkit-backdrop-filter |
50px |
-webkit-backdrop-filter | Blur radius for the webkit backdrop filter. |
--loader-backdrop-blur |
50px |
backdrop-filter | Blur radius for the backdrop filter. |
--brand-loader-background-animation-duration |
5s |
animation | Duration of the background gradient sweep animation. Falls back through --motion-duration. |
--brand-loader-background-animation-easing |
ease-in-out |
animation | Easing curve of the background gradient sweep animation. Falls back through --motion-easing. |
--brand-loader-ellipsis-animation-duration |
0.6s |
animation | Duration of each ellipsis dot's bounce animation (shared by all three dots). Falls back through --motion-duration. |
Web Component
Tag: <sui-brand-loader>
<sui-brand-loader brand-text="Loading..." sub-text="Please wait"></sui-brand-loader>