Typst Boxes is a Typst package for adding colorful, customizable boxes to your documents.
➡️ Explore the live example project
- Predefined color themes: black, red, blue, green, purple, gold, and more
slanted-colorbox
for angled headlinesoutline-colorbox
for simple bordered layoutsstickybox
for rotatable notes- Custom color support via
color
parameter (string or dictionary) - Disable sticky tape with
tape: false
#colorbox(
title: lorem(5),
color: "blue",
radius: 2pt,
width: auto,
)[
#lorem(50)
]
Use other built‑in colors:
"red"
, "green"
, "purple"
, "gold"
, "gray"
, "cyan"
, etc.
Custom color via dictionary:
#colorbox(
title: "Custom Theme",
color: (
fill: rgb("#f0f8ff"),
stroke: rgb("#00bfff"),
title: rgb("#002366")
),
radius: 4pt,
width: auto
)[
"This box uses a custom color dictionary."
]
#slanted-colorbox(
title: lorem(5),
color: "red",
radius: 0pt,
width: auto,
)[
#lorem(50)
]
#outline-colorbox(
title: lorem(5),
width: auto,
radius: 2pt,
centering: false,
)[
#lorem(50)
]
#outline-colorbox(
title: lorem(5),
color: "green",
width: auto,
radius: 2pt,
centering: true,
)[
#lorem(50)
]
Custom colors via dictionary:
#outline-colorbox(
title: "Soft Green",
color: (
fill: green.lighten(70%),
stroke: green.darken(40%)
),
width: auto,
radius: 2pt,
centering: false,
)[
#lorem(20)
]
#stickybox(
rotation: 5deg,
width: 5cm,
)[
#lorem(20)
]
#stickybox(
width: 5cm,
rotation: -5deg,
fill: rgb("#ffb6a6"),
)[
#lorem(20)
]
#stickybox(
width: 8cm,
fill: rgb("#33ff57"),
tape: false,
)[
"No tape here!"
]
We welcome contributions!
- Fork this repository
- Create a feature branch
- Open a pull request with a clear description
This project is licensed under the MIT License. See LICENSE for details.