InterfaceSwitched
InterfaceSwitched[size1expr1,size2expr2,… >]
is a construct that behaves as if it were expri when it is in an interface environment with width sizei.
InterfaceSwitched["param",key1expr1,key2expr2,… >]
behaves as if it were expri when the value of the interface parameter param corresponds to keyi.
Details
- InterfaceSwitched can be used to create responsive web interfaces that change depending on their display environments.
- InterfaceSwitched does not evaluate in the kernel, but resolves only in the web browser.
- InterfaceSwitched constructs can be nested.
- Possible values of param include:
-
"Width" pixel width of viewport area "Height" pixel height of viewport area "Orientation" orientation of device "DeviceType" type of device - Possible values of size for "Width" and "Height" are:
-
n size of at least n pixels {min, max} size between min and max pixels - Possible values of key for "Orientation" are:
-
"Vertical", "Portrait" device held vertically "Horizontal", "Landscape" device held horizontally - Possible values of key for "DeviceType" are:
-
"Print" used when printing "Screen" used for displays on computers, tablets, phones "Speech" used for screen readers - Typical widths of various devices are:
-
Phone 480 pixels Tablet 768 pixels Desktop 992 pixels Large screen 1200 pixels - In all cases, the following keys can be used:
-
Automatic fallthrough for unspecified cases case1case2… several alternative cases
Examples
open allclose allBasic Examples (2)
Applications (1)
Use InterfaceSwitched to specify some content that should only appear when the webpage is printed:
Properties & Relations (1)
InterfaceSwitched can be used to change the content of a WebItem, WebRow and WebColumn:
Text
Wolfram Research (2021), InterfaceSwitched, Wolfram Language function, https://reference.wolfram.com/language/ref/InterfaceSwitched.html.
CMS
Wolfram Language. 2021. "InterfaceSwitched." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/InterfaceSwitched.html.
APA
Wolfram Language. (2021). InterfaceSwitched. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/InterfaceSwitched.html