# Block UI (ref)

(part of package '[Block UI](https://docs.servoy.com/reference/servoyextensions/packages/browser-plugin-packages/block-ui)')

You can access it in code via: **plugins.svyBlockUI**

Block UI Service can show an overlay over the whole browser page while some (long) operations are being executed. It prevents any interaction with the UI. The overlay UI can be customized from CSS, using block-ui-main and block-ui-spinner classes.

## Properties

### delay

This is the delay in milliseconds how long it must take to start show the blocking ui Type: [Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) Default Value: 250

***

### messageStyleClass

CSS style class applied to the message area of the blocking UI. Type: [Styleclass](https://docs.servoy.com/servoy-developer/component_and_service_property_types#styleclass)

***

### overlayColor

(Deprecated) The overlay color for the blocking UI. Use CSS classes (block-ui-main) to style the overlay. Type: [Color](https://docs.servoy.com/servoy-developer/component_and_service_property_types#color) Default Value: "#ffffff"

***

### overlayOpacity

(Deprecated) The overlay opacity for the blocking UI. Use CSS classes (block-ui-main) to style the overlay. Type: [Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number) Default Value: 0.5

***

### spinner

(Deprecated) The spinner configuration as a string. Use CSS classes (block-ui-spinner) to style the spinner. Type: [String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)

***

### spinnerBgColor

(Deprecated) The background color for the spinner. Use CSS classes (block-ui-spinner) to style the spinner. Type: [Color](https://docs.servoy.com/servoy-developer/component_and_service_property_types#color)

***

## API

### setMessage(message)

Updates the message of the UI Blocker

**Parameters:**

> * {[String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)} message The new message to display while the UI is blocked.

***

### show(message,timeout)

Shows the UI Blocker

**Parameters:**

> * {[String](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/string)} message The message to display while the UI is blocked.
> * {[Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)} \[timeout] Number of milliseconds until the blocker is hidden

***

### stop(timeout)

Stops all UI Blockers

**Parameters:**

> * {[Number](https://docs.servoy.com/reference/servoycore/dev-api/js-lib/number)} \[timeout] Optional number of milliseconds until the blocker is hidden

***

***
