LightModePane[expr]
displays as a light mode pane containing expr.
LightModePane[expr,w]
makes the pane be w printer's points wide, linewrapping the contents if necessary.
LightModePane[expr,{w,h}]
makes the pane be w points wide and h points high, shrinking the contents if necessary.
LightModePane
LightModePane[expr]
displays as a light mode pane containing expr.
LightModePane[expr,w]
makes the pane be w printer's points wide, linewrapping the contents if necessary.
LightModePane[expr,{w,h}]
makes the pane be w points wide and h points high, shrinking the contents if necessary.
Details and Options
- LightModePane displays its contents in light mode regardless of the LightDark setting of its surrounding environment.
- The following options can be given:
-
Alignment {Automatic,Automatic} how to align objects in the display area AppearanceElements Automatic elements to include in the displayed pane Background Automatic default background color for the pane BaseStyle {} base style specifications for the pane FrameMargins Automatic margins inside the frame of the pane ImageMargins 0 margins to add outside the display area ImageSize Automatic the overall image size of the displayed pane ImageSizeAction Automatic what to do if the content size does not match the image size Scrollbars False whether to include scrollbars ScrollPosition {0,0} scroll position if scrolling is enabled - The default option BackgroundAutomatic uses the background color ThemeColor["Background"].
- With a typical default stylesheet, LightModePane[expr] with no additional options displays exactly like expr in light mode.
- LightModePane[expr,w] is equivalent to LightModePane[expr,ImageSize->w,ImageSizeAction->"Clip"].
- LightModePane[expr,{w,h}] is equivalent to LightModePane[expr,ImageSize->{w,h},ImageSizeAction->"Clip"].
- LightModePane[expr,{w,h},Scrollbars->Automatic] effectively uses ImageSizeAction->"Clip".
- If w or h is specified as an UpTo expression, then the value is treated as the maximum width or height. Pane will use a smaller value if needed to trim whitespace around the contents.
- The setting ImageSizeAction->"Scrollable" makes the contents of the pane scrollable if necessary.
- Possible elements in AppearanceElements include "ResizeArea".
- The settings for BaseStyle are appended to the default style typically given by the "Pane" style in the current stylesheet.
- LightModePane is effectively implemented as an ExpressionCell with appropriate LightDark and Background settings wrapped around a Pane.
Examples
open all close allBasic Examples (1)
Display an output using LightModePane:
LightModePane["abc"]Display light mode and dark mode side by side:
{LightModePane[Plot[Sin[x], {x, 0, 2Pi}]], DarkModePane[Plot[Sin[x], {x, 0, 2Pi}]]}Scope (10)
Content (6)
LightModePane[StringRiffle[RandomWord[50], " "]]LightModePane[Column[Solve[a x ^ 2 + b x + c == 0, x]]]LightModePane[Graphics[Disk[]]]LightModePane[Graphics3D[Sphere[]]]LightModePane[Plot[x, {x, 0, 1}]]LightModePane[Plot3D[Sin[x y], {x, 0, 2Pi}, {y, 0, 2Pi}]]LightModePane[Manipulate[x, {x, 0, 1}]]LightModePane[Manipulate[Plot[Sin[n x], {x, 0, 2Pi}], {n, 1, 5}]]Size (4)
Specify a width, accepting the default height:
LightModePane[20!, 100]Specify an exact width and height, adding space if necessary:
LightModePane[10, {50, 50}]Specify an exact width and height, clipping if necessary:
LightModePane[Range[50], {100, 100}]Use UpTo to set the maximum dimension while allowing for smaller values:
LightModePane[Graphics[Disk[], ImageSize -> {50, 50}], {UpTo[25], UpTo[100]}]Options (15)
Alignment (1)
AppearanceElements (2)
Specify resizable LightModePane by using AppearanceElements->{"ResizeArea"}:
LightModePane[Range[50], {100, 100}, ImageSizeAction -> "ResizeToFit", AppearanceElements -> {"ResizeArea"}]Create resizable graphics using ImageSize->Full:
LightModePane[Graphics[Disk[], ImageSize -> Full], {100, 100}, ImageSizeAction -> "ResizeToFit", AppearanceElements -> {"ResizeArea"}]By default, LightModePane is resizable if Scrollbars->True:
LightModePane[Range[50], Scrollbars -> True]Use AppearanceElements->None to disable resizing:
LightModePane[Range[50], Scrollbars -> True, AppearanceElements -> None]BaselinePosition (1)
ImageMargins (1)
ImageSize (3)
ImageSize and the second argument have the same effect:
{LightModePane[50!, 200], LightModePane[50!, ImageSize -> 200]}Specify the overall size of the pane:
LightModePane[50!, ImageSize -> {200, 100}]//FramedSpecify a maximum width and use the natural height of the contents:
LightModePane[50!, ImageSize -> {UpTo[200], Automatic}]//FramedImageSizeAction (3)
The default for ImageSizeAction is "Clip":
LightModePane[150!, ImageSize -> {100, 100}]Use "ShrinkToFit" to fit all data in the pane:
LightModePane[150!, ImageSize -> {100, 100}, ImageSizeAction -> "ShrinkToFit"]Use "Scrollable" to allow scrolling on mouse drag:
LightModePane[150!, ImageSize -> {100, 100}, ImageSizeAction -> "Scrollable"]Scrollbars (3)
Create LightModePane with automatic scrollbars:
{LightModePane[200!, ImageSize -> {200, 100}, Scrollbars -> True], LightModePane[Style[200!, LineBreakWithin -> False], ImageSize -> {200, 100}, Scrollbars -> True]}Create LightModePane with only a vertical or horizontal scrollbar:
{LightModePane[200!, ImageSize -> {200, 100}, Scrollbars -> {False, True}], LightModePane[Style[200!, LineBreakWithin -> False], ImageSize -> {200, 100}, Scrollbars -> {True, False}]}Disable resizing of LightModePane contents while allowing scrollbars:
LightModePane[Graphics3D[Sphere[], ImageSize -> 500], ImageSize -> {200, 200}, Scrollbars -> True, AppearanceElements -> None]ScrollPosition (1)
Specify the initial position of the scrollbars (in pixels):
LightModePane[Panel[700!, ImageSize -> {500, 500}], ImageSize -> {200, 200}, Scrollbars -> True, ScrollPosition -> {150, 200}]LightModePane[Graphics3D[Sphere[], ImageSize -> 500], ImageSize -> {200, 200}, Scrollbars -> True, ScrollPosition -> {150, 200}]Related Guides
-
▪
- Accessibility ▪
- Colors
History
Introduced in 2026 (15.0)
Text
Wolfram Research (2026), LightModePane, Wolfram Language function, https://reference.wolfram.com/language/ref/LightModePane.html.
CMS
Wolfram Language. 2026. "LightModePane." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LightModePane.html.
APA
Wolfram Language. (2026). LightModePane. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LightModePane.html
BibTeX
@misc{reference.wolfram_2026_lightmodepane, author="Wolfram Research", title="{LightModePane}", year="2026", howpublished="\url{https://reference.wolfram.com/language/ref/LightModePane.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_lightmodepane, organization={Wolfram Research}, title={LightModePane}, year={2026}, url={https://reference.wolfram.com/language/ref/LightModePane.html}, note=[Accessed: 12-June-2026]}