Typix LogoTypix
Editor Toolbar

ColorTextButton

Change the text color of the selected content.

Install

npx typix ui add color-text-button

Import

import { ColorTextButton } from "@/components/typix/main/color-text-button";

Props

PropTypeDefaultDescription
textstringOverride the button label.
defaultColorstring"#000000"Default color shown in the button.
hideWhenUnavailablebooleanfalseHide when color can't be set.
onColorSelected(color: string) => voidCalled when a color is selected.
classNamestringAdditional CSS classes.

Exports

import { TEXT_COLORS_TEXT, TEXT_COLOR_VALUES } from "@/components/typix/main/color-text-button";
// TEXT_COLORS_TEXT — array of color name strings
// TEXT_COLOR_VALUES — array of hex color values

On this page