

StyleBox
Details

- StyleBox is the low-level representation of Style. Except for low-level notebook expression manipulation, StyleBox should not need to be used directly.
- You can use any option that is documented to apply at the style level. This includes font options such as FontSize, FontWeight, FontSlant, FontFamily, FontColor, and Background in StyleBox.
- The following additional options can be given:
-
ShowContents True whether to make boxes visible or just leave space for them StripOnInput True whether to strip the FrameBox wrapper on evaluation - In StandardForm and InputForm input, StyleBox is by default ignored, so that StyleBox[box,spec] is interpreted just as box would be.
- When StyleBox objects are nested, the options of the innermost one control the display of particular boxes.
- In StandardForm, explicit StyleBox objects are output literally. You can use DisplayForm to see the display form of such objects.
Examples
Basic Examples (4)
Style boxes or text according to a style option:
Display some text that cannot be selected except as a whole:
By default, spanning characters such as braces do not grow arbitrarily large:
Use SpanMaxSize to allow braces to grow to the full size:
See Also
Tech Notes
Related Guides
Related Workflows
- Add Styling to Text ▪
- Add Styling to Math ▪
- Choose a Stylesheet for a Notebook
History
Introduced in 1996 (3.0) | Updated in 2007 (6.0)
Text
Wolfram Research (1996), StyleBox, Wolfram Language function, https://reference.wolfram.com/language/ref/StyleBox.html (updated 2007).
CMS
Wolfram Language. 1996. "StyleBox." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/StyleBox.html.
APA
Wolfram Language. (1996). StyleBox. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/StyleBox.html
BibTeX
@misc{reference.wolfram_2025_stylebox, author="Wolfram Research", title="{StyleBox}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/StyleBox.html}", note=[Accessed: 08-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_stylebox, organization={Wolfram Research}, title={StyleBox}, year={2007}, url={https://reference.wolfram.com/language/ref/StyleBox.html}, note=[Accessed: 08-August-2025]}