Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.
React Context Menu - Text Alignment Menu
A React context menu for text alignment with nested submenu (left, center, right, justify) and increase/decrease indent operations for rich text editors
Looking to implement shadcn/ui patterns?
Join our Discord community for help from other developers.
Text alignment shouldn't require toolbar hunting. This React context menu provides alignment options via nested submenu—left, center, right, justify—plus indent controls. Built with shadcn/ui and Radix UI with Lucide React alignment icons—perfect for document editors, blog platforms, or email composers where text layout matters.
Pattern created by @haydenbleasel
Installation
Related patterns you will also like
Text Formatting Menu
Bold, italic, underline formatting options
Text Editing Menu
Cut, copy, paste clipboard operations
Font and Style Menu
Font selection with nested submenus
Context Menu with Submenus
General submenu pattern
Align and Distribute Menu
Similar alignment submenu structure
Dropdown Menu with Submenus
Alternative menu with nested options
Questions you might have
React Context Menu - Text Formatting Menu
A React context menu for text formatting with bold, italic, underline, strikethrough, and clear formatting using keyboard shortcuts for rich text editors
React Context Menu - Spell Check Menu
A React context menu for spell checking with labeled suggestions section, correction options, add to dictionary, and ignore for text editors