Typix LogoTypix
Editor Toolbar

TextAlignButton

Set text alignment to left, center, right, or justify.

Install

npx typix ui add text-align-button

Import

import { TextAlignButton } from "@/components/typix/main/text-align-button";

Props

PropTypeDefaultDescription
alignTextAlignThe alignment to apply. Required.
textstringOverride the button label.
hideWhenUnavailablebooleanfalseHide when alignment can't be set.
showShortcutbooleantrueShow keyboard shortcut in tooltip.
onAligned() => voidCalled after alignment is applied.
classNamestringAdditional CSS classes.

TextAlign

type TextAlign = "left" | "center" | "right" | "justify";

On this page