Editor Toolbar
FontSizeInput
Increment or decrement the font size of the selected text.
Install
npx typix ui add font-size-inputImport
import { FontSizeInput } from "@/components/typix/main/font-size-input";Props
| Prop | Type | Default | Description |
|---|---|---|---|
hideWhenUnavailable | boolean | false | Hide when font size can't be changed. |
onChanged | (size: number) => void | — | Called when the font size changes. |
className | string | — | Additional CSS classes. |
Hook
import { useFontSize } from "@/components/typix/main/font-size-input";
const { currentSize, canIncrease, canDecrease, handleIncrease, handleDecrease, handleSetSize } = useFontSize({});