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.


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 "LightDark" application running in light or dark mode - 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 - Possible values of key for "LightDark" are "Light" and "Dark".
- 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 case1|case2|… several alternative cases
Examples
open all close 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:
Related Guides
Text
Wolfram Research (2021), InterfaceSwitched, Wolfram Language function, https://reference.wolfram.com/language/ref/InterfaceSwitched.html (updated 2025).
CMS
Wolfram Language. 2021. "InterfaceSwitched." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2025. 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
BibTeX
@misc{reference.wolfram_2025_interfaceswitched, author="Wolfram Research", title="{InterfaceSwitched}", year="2025", howpublished="\url{https://reference.wolfram.com/language/ref/InterfaceSwitched.html}", note=[Accessed: 15-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_interfaceswitched, organization={Wolfram Research}, title={InterfaceSwitched}, year={2025}, url={https://reference.wolfram.com/language/ref/InterfaceSwitched.html}, note=[Accessed: 15-August-2025]}