Typix LogoTypix
Editor Toolbar

ColorHighlightButton

Apply a background highlight color to the selected text.

Install

npx typix ui add color-highlight-button

Import

import { ColorHighlightButton } from "@/components/typix/main/color-highlight-button";

Props

PropTypeDefaultDescription
textstringOverride the button label.
defaultColorstringfirst highlight colorDefault color shown.
hideWhenUnavailablebooleanfalseHide when unavailable.
showShortcutbooleantrueShow keyboard shortcut in tooltip.
onColorSelected(color: string) => voidCalled when a color is selected.
classNamestringAdditional CSS classes.

Exports

import { HIGHLIGHT_COLORS, HIGHLIGHT_COLOR_VALUES } from "@/components/typix/main/color-highlight-button";

On this page