Customizing Components Fentrica web components are built to be easily customized and modified to fit your brand. All components are themed using CSS variables , configured via a global JavaScript object, and translated using i18next .
CSS variables allow you to change colors, fonts, and backgrounds across all components without modifying source code. Set them on :root or scope them to a specific container.
Components have 9 default color palettes. Each color can be used through component color parameters (e.g. color="primary").
Color Usage primaryMain brand color, used for primary actions and highlights secondarySecondary brand color tertiaryTertiary accent color successPositive states, confirmations warningCaution states, non-critical alerts dangerError states, destructive actions darkDark UI elements mediumNeutral, muted elements lightLight UI elements
Each color consists of six CSS variables — a base, contrast, shade, and tint — that must all be set together when overriding:
Property Variable Description Base --lar-color-{name}The base color in hex Base (RGB) --lar-color-{name}-rgbThe base color as comma-separated RGB values Contrast --lar-color-{name}-contrastText/icon color visible against the base Contrast (RGB) --lar-color-{name}-contrast-rgbThe contrast color as comma-separated RGB values Shade --lar-color-{name}-shadeA slightly darker version of the base Tint --lar-color-{name}-tintA slightly lighter version of the base
When overriding a color, set all six variables . Omitting any of them may cause inconsistent rendering in components that rely on shade, tint, or contrast variants.
:root {
--lar-color-secondary : #006414 ;
--lar-color-secondary-rgb : 0 , 100 , 20 ;
--lar-color-secondary-contrast : #ffffff ;
--lar-color-secondary-contrast-rgb : 255 , 255 , 255 ;
--lar-color-secondary-shade : #005414 ;
--lar-color-secondary-tint : #007414 ;
}
Color Default hex Contrast primary#780bb7#ffffffsecondary#7fb800#fffffftertiary#00a6ed#ffffffsuccess#7fb800#ffffffwarning#ffb400#000000danger#f6511d#fffffflight#f4f5f8#000000medium#d6d6d6#000000dark#222428#ffffff
Global CSS variables that control the overall appearance:
Variable Default Description --lar-background-color#000Base background color --lar-text-color#fffDefault text color --lar-backdrop-color#000Overlay/backdrop color for modals and sheets --lar-font-family"Helvetica Neue", "Roboto", sans-serifFont family for all component text
Background and text colors each have 20 stepped shades (from step-50 to step-1000 in increments of 50) used for layered surfaces and text opacity levels:
Variable pattern Description --lar-background-color-step-{50..1000}Stepped background shades — lower values are closer to background, higher values step toward text color --lar-text-color-step-{50..1000}Stepped text shades — lower values are closer to text color, higher values step toward background
:root {
--lar-background-color : #1a1a2e ;
--lar-background-color-step-50 : #1f1f35 ;
--lar-background-color-step-100 : #24243c ;
--lar-text-color : #e0e0e0 ;
--lar-font-family : 'Inter' , sans-serif ;
}
Variable Default Description --lar-backdrop-opacity0.92Backdrop overlay opacity --lar-ios-blur10pxiOS-style blur effect on backdrops
Nodes are the primary UI building blocks — each device control (switch, slider, sensor) renders as a node.
Variable Default Description --lar-node-box-height10remStandard node card height --lar-node-box-border-radius0.5remNode card corner radius --lar-node-small-box-height4remSmall node card height --lar-node-small-box-border-radius0.5remSmall node card corner radius
Variable Default Description --lar-node-margin-top1remNode top margin --lar-node-margin-right1remNode right margin --lar-node-margin-bottom1remNode bottom margin --lar-node-margin-left1remNode left margin
Variable Default Description --lar-node-icon-size3remStandard icon size --lar-node-icon-border-radius50%Icon border radius --lar-node-icon-padding-top1.2remIcon container padding (top) --lar-node-icon-padding-right1.2remIcon container padding (right) --lar-node-icon-padding-bottom1.2remIcon container padding (bottom) --lar-node-icon-padding-left1.2remIcon container padding (left) --lar-node-small-icon-size1.8remSmall icon size --lar-node-small-icon-padding-top0.5remSmall icon padding (top) --lar-node-small-icon-padding-right0.5remSmall icon padding (right) --lar-node-small-icon-padding-bottom0.5remSmall icon padding (bottom) --lar-node-small-icon-padding-left0.5remSmall icon padding (left)
Variable Default Description --lar-node-icon-small-size1.7remStatus badge icon size --lar-node-icon-small-border-radius0.4remStatus badge corner radius --lar-node-icon-small-border-width0.3remStatus badge border width --lar-node-icon-small-border-stylesolidStatus badge border style --lar-node-icon-small-border-colorbackground color Status badge border color --lar-node-icon-small-top-0.85remStatus badge position (top) --lar-node-icon-small-left-0.85remStatus badge position (left) --lar-node-icon-small-padding-*0.6remStatus badge padding (top/right/bottom/left)
Variable Default Description --lar-node-value-font-size1.3remNode value display font size
Variable Description --lar-node-cam-text-topCamera text overlay position (top) --lar-node-cam-text-rightCamera text overlay position (right) --lar-node-cam-text-bottomCamera text overlay position (bottom) --lar-node-cam-text-leftCamera text overlay position (left) --lar-node-cam-text-font-sizeCamera text overlay font size --lar-node-cam-text-max-widthCamera text overlay max width --lar-node-cam-text-max-heightCamera text overlay max height --lar-node-cam-modal-text-topModal camera text position (top) --lar-node-cam-modal-text-rightModal camera text position (right) --lar-node-cam-modal-text-bottomModal camera text position (bottom) --lar-node-cam-modal-text-leftModal camera text position (left)
Variable Default Description --lar-modal-padding-top2remModal content padding (top) --lar-modal-padding-right1remModal content padding (right) --lar-modal-padding-bottom1.3remModal content padding (bottom) --lar-modal-padding-left1remModal content padding (left) --lar-modal-big-icon-size4remLarge icon size in modals --lar-modal-small-icon-size1.5remSmall icon size in modals --lar-modal-value-font-size2.2remValue display font size in modals --lar-modal-blur3pxModal background blur --lar-modal-header-opacity0.8Modal header opacity --lar-modal-info-opacity0.8Modal info section opacity --lar-modal-icon-box-shadow— Box shadow for modal header icons
Variable Default Description --lar-button-border-radius0.6remButton corner radius --lar-button-padding-top1remButton padding (top) --lar-button-padding-right1remButton padding (right) --lar-button-padding-bottom1remButton padding (bottom) --lar-button-padding-left1remButton padding (left) --lar-button-font-size1.2remButton font size --lar-button-border-radius-small0.6remSmall button corner radius --lar-button-padding-top-small0.6remSmall button padding (top) --lar-button-padding-right-small0.6remSmall button padding (right) --lar-button-padding-bottom-small0.6remSmall button padding (bottom) --lar-button-padding-left-small0.6remSmall button padding (left) --lar-button-font-size-small1remSmall button font size
Variable Default Description --lar-badge-padding-top0.15remBadge padding (top) --lar-badge-padding-right0.25remBadge padding (right) --lar-badge-padding-bottom0.15remBadge padding (bottom) --lar-badge-padding-left0.25remBadge padding (left) --lar-badge-border-radius0.2remBadge corner radius
Variable Default Description --lar-list-item-padding-top0.5remList item padding (top) --lar-list-item-padding-right0.5remList item padding (right) --lar-list-item-padding-bottom0.5remList item padding (bottom) --lar-list-item-padding-left0.5remList item padding (left)
Variable Default Description --lar-icon-size-small1remSmall icon size --lar-icon-size-medium1.5remMedium icon size --lar-icon-size-large2remLarge icon size
Variable Default Description --lar-notify-padding-top1remNotification padding (top) --lar-notify-padding-right1remNotification padding (right) --lar-notify-padding-bottom1remNotification padding (bottom) --lar-notify-padding-left1remNotification padding (left) --lar-notify-border-radius0.5remNotification corner radius --lar-notify-font-size1remNotification font size --lar-notify-line-height1.5Notification line height --lar-notify-backdrop-filterblur(8px)Notification backdrop blur --lar-notify-box-shadow0 4px 6px -1px rgb(0 0 0 / 0.1), ...Notification box shadow
Variable Description --lar-push-button-sizeStandard push button size --lar-push-button-size-smallSmall push button size
Components use a global configuration object bound to window.Larva.config. This lets you control animations, date formats, and other runtime behavior.
Set default values before components are loaded:
window.Larva = {
config: {
animated: true ,
swipeBack: true ,
}
};
After components are loaded, the config object is converted to a getter/setter interface:
// Disable animations at runtime
window.Larva.config. set ( 'animated' , false );
// Read current value
window.Larva.config. get ( 'animated' ); // false
Configuration can also be overridden via URL query parameters using the larva: prefix:
https://your-app.com/?larva:animated=false&larva:swipeBack=false
Property Type Default Description animatedboolean trueEnable or disable component animations swipeBackboolean trueEnable swipe-back gesture for node modals formatDateTimestring DD.MM.YYYY HH:mmLong date and time format formatLongDatestring DD.MM.YYYYLong date format formatShortDatestring DD.MM.YYYYShort date format formatLongTimestring HH:mmLong time format formatShortTimestring HH:mmShort time format videoproxyURLstring ws(s)://hostname:port/pathRTSP/H264 and HTTP/MJPEG WebSocket proxy URL for the lar-rtsp-h264-mjpeg video component
Components use i18next for internationalization. The i18next instance is bound to window.Larva.i18n, giving you full control over translations.
window.Larva.i18n. addResourceBundle ( 'en' , 'namespace1' , {
key: 'hello from namespace 1'
});
window.Larva.i18n. changeLanguage ( 'en' , ( err , t ) => {
if (err) return console. error ( 'Language change failed:' , err);
console. log ( 'Language changed successfully' );
});
All component titles and labels pass through the i18next translation pipeline. To customize any text shown by a component, add the corresponding translation key to your resource bundle.
The default English translation bundle contains all keys used by components. Use it as a reference when adding new languages or overriding specific labels:
View default English bundle