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
textstring—Override the button label.
defaultColorstringfirst highlight colorDefault color shown.
hideWhenUnavailablebooleanfalseHide when unavailable.
showShortcutbooleantrueShow keyboard shortcut in tooltip.
onColorSelected(color: string) => void—Called when a color is selected.
classNamestring—Additional CSS classes.

Exports

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

On this page