Editor Toolbar
TextAlignButton
Set text alignment to left, center, right, or justify.
Install
npx typix ui add text-align-buttonImport
import { TextAlignButton } from "@/components/typix/main/text-align-button";Props
| Prop | Type | Default | Description |
|---|---|---|---|
align | TextAlign | — | The alignment to apply. Required. |
text | string | — | Override the button label. |
hideWhenUnavailable | boolean | false | Hide when alignment can't be set. |
showShortcut | boolean | true | Show keyboard shortcut in tooltip. |
onAligned | () => void | — | Called after alignment is applied. |
className | string | — | Additional CSS classes. |
TextAlign
type TextAlign = "left" | "center" | "right" | "justify";