Typix LogoTypix
Editor Toolbar

FontSizeInput

Increment or decrement the font size of the selected text.

Install

npx typix ui add font-size-input

Import

import { FontSizeInput } from "@/components/typix/main/font-size-input";

Props

PropTypeDefaultDescription
hideWhenUnavailablebooleanfalseHide when font size can't be changed.
onChanged(size: number) => voidCalled when the font size changes.
classNamestringAdditional CSS classes.

Hook

import { useFontSize } from "@/components/typix/main/font-size-input";

const { currentSize, canIncrease, canDecrease, handleIncrease, handleDecrease, handleSetSize } = useFontSize({});

On this page