fluid

Description
Global Fluid UI object. All global Fluid UI functions and variables are stored in this object.
Properties
Name Type Description
screens object Fluid UI screens object containing functions for local screens and URLs for external screens
externalScreens object Contains all of the functions for external screens, which are added to this object as needed
includedThemes Array.<string> The list of color theme IDs included in this version of Fluid UI. This should NOT be changed for custom themes.
themes Object.<string, Theme> Contains all of the color theme objects
config FluidConfig Fluid UI configuration variables
Details

Methods


<static> getURLScreen() → {object}

Description
Gets the current screen from the URL parameter
Returns
The screenID and parameter from the URL
Details

<static> theme( requestedTheme [, temporary ] )

Description
Applies a theme, stores the preference, and updates the theme selection UI
Parameters
Name Type Attributes Default Description
requestedTheme string The ID of the theme to apply
temporary boolean <optional>
false If the theme is only being applied temporarily. When true, the theme will be applied, but the preference will not be saved.
Details

<static> themeImage( requestedImage [, temporary ] )

Description
Applies a theme, stores the preference, and updates the theme selection UI
Parameters
Name Type Attributes Default Description
requestedImage string | boolean The URL of the image to apply. If false, the theme image will be disabled.
temporary boolean <optional>
false If the image is only being applied temporarily. When true, the theme will be applied, but the preference will not be saved.
Details

<static> get( key )

Description
Gets a Fluid UI preference
Parameters
Name Type Description
key string The name of the preference to get
Details

<static> set( key, val [, trigger ] )

Description
Sets a Fluid UI preference
Parameters
Name Type Attributes Description
key string The name of the preference to set
val string The value of the preference to set
trigger 'load' <optional>
This is "load" if setting the preference during initial page load
Details

<static> applyConfig()

Description
Applies the fluidConfig configuration parameters, if provided. Ran automatically from fluid.onLoad, but can be called manually after if needed. If ran multiple times, each fluidConfig acts as a patch over the previous.
Details

<static> onLoad()

Description
Loads Fluid UI JavaScript features for initial page load. This should only run once. fluid.init should be used instead for initializing new elements page.
Details

<static> init()

Description
Used to initialize new elements added to the document
Details

<static> screen( [ requestedID [, ctx ] ] )

Description
Updates the current screen state and loads a new screen
Parameters
Name Type Attributes Description
requestedID string <optional>
The ID of the screen to load
ctx string | object <optional>
The context passed to the screen
Details

<static> loadScreen( screenID [, ctx ] )

Description
Loads a screen. This should not be called directly (see fluid.screen instead).
Parameters
Name Type Attributes Description
screenID string The ID of the screen to load
ctx string | object <optional>
The context parameter passed to the screen
Details

<static> generateOverlay()

Description
Generates the blur overlay used when a card is opened. This should not be called directly.
Details

<static> blur( [ noBlur ] )

Description
Shows the page blur effect. This should not be called directly.
Parameters
Name Type Attributes Default Description
noBlur boolean <optional>
false If this is true, the blur container will be shown without the blur effect
Details

<static> unblur()

Description
Removes the blur effect. This should not be called directly.
Details

<static> splash( element )

Description
Shows a splash screen
Parameters
Name Type Description
element Element | string The element to show
Details

<static> unsplash()

Description
Hides all splash screens
Details

<static> cards( element )

Description
Shows a card
Parameters
Name Type Description
element Element | string The card element to show
Details

<static> alert( title, body [, icon [, actions [, color ] ] ] )

Description
Shows a Fluid UI alert. If only one parameter is provided (e.g. fluid.alert('Test alert')), a generic alert will be shown
Parameters
Name Type Attributes Description
title string The alert title
body string Alert body HTML
icon string <optional>
Alert icon
actions Array.<AlertAction> <optional>
Alert actions
color string <optional>
The icon color
Details

<static> exitAlert()

Description
Closes the active alert
Details