# j-Display

> The component calculates the interval between displays automatically. The default display type is lg.

Framework: jcomponent20
Product: jComponent 20 (jcomponent@20)
Language: en
Content-SHA256: 1768e705ac6ce43d082080a400d9911dd3a890c2de7decca43d829ed73e7a554
Snapshot: c0700e321579725c5cf4f5ace1ad7d2866d1b4f93c24a63c0b41b6b7998e976c
Sources: components@910ed1a86f6e72b4f031d3ad0dc7844f9fc5cb8e
Review: not-recorded

The component measures a display size according to the current element. It uses `WIDTH()` method and appends a CSS class in the form `jc-DISPLAY_SIZE`:

- `jc-xs` extra small display (mobile phone)
- `jc-sm` small display (tablet)
- `jc-md` medium display (laptop)
- `jc-lg` large display (desktop computer)

__Configuration__:

- `delay {Number}` a delay for obtaining of size (default: `100` ms)
- __NEW__: `xs {Number}` a maximum width for the extra small display (default: `768`)
- __NEW__: `sm {Number}` a maximum width for the small display (default: `992`)
- __NEW__: `md {Number}` a maximum width for the medium display (default: `1200`)

The component calculates the interval between displays automatically. The default display type is `lg`.

Use it with `<ui-component name="display">`. When the component is not loaded yet, jComponent downloads it on first use from the address in `DEF.fallback` (the Componentator CDN by default). Author: Peter Širka. Source: the Componentator components repository, MIT license.

```html example.html
<div style="width:500px;padding:10px;border:1px solid #E0E0E0">
	<ui-component name="display" path="common.xs">
		<ui-bind path="common.xs" config="text" class="block"></ui-bind>
	</ui-component>
</div>
<br />
<div style="width:800px;padding:10px;border:1px solid #E0E0E0">
	<ui-component name="display" path="common.sm">
		<ui-bind path="common.sm" config="text" class="block"></ui-bind>
	</ui-component>
</div>
<br />
<div style="width:1080px;padding:10px;border:1px solid #E0E0E0">
	<ui-component name="display" path="common.md">
		<ui-bind path="common.md" config="text" class="block"></ui-bind>
	</ui-component>
</div>
<br />
<div style="width:1380px;padding:10px;border:1px solid #E0E0E0">
	<ui-component name="display" path="common.lg">
		<ui-bind path="common.lg" config="text" class="block"></ui-bind>
	</ui-component>
</div>
<br />
```
