summaryrefslogtreecommitdiffstats
path: root/examples/overflow.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/overflow.py')
-rw-r--r--examples/overflow.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/examples/overflow.py b/examples/overflow.py
new file mode 100644
index 0000000..5adaa3d
--- /dev/null
+++ b/examples/overflow.py
@@ -0,0 +1,11 @@
+from typing import List
+from rich.console import Console, OverflowMethod
+
+console = Console(width=14)
+supercali = "supercalifragilisticexpialidocious"
+
+overflow_methods: List[OverflowMethod] = ["fold", "crop", "ellipsis"]
+for overflow in overflow_methods:
+ console.rule(overflow)
+ console.print(supercali, overflow=overflow, style="bold blue")
+ console.print()