UNPKG

handwritten-highlights

Version:

Beautiful & animated text highliter for your Next/React project. Enhance your text with colorful visuals and animations that resembles real writing.

49 lines (43 loc) 2.1 kB
import * as react_jsx_runtime from 'react/jsx-runtime'; import React from 'react'; interface HighlightProviderProps { children: React.ReactNode; } declare const HighlightProvider: ({ children }: HighlightProviderProps) => react_jsx_runtime.JSX.Element; interface HighlightMarkerProps { children: React.ReactNode; highlightVariant?: "1" | "2" | "3" | "random"; highlightColor?: CSSColor; animationOffset?: number; animationDirection?: "left" | "right" | "center"; animationDuration?: number; animationEffect?: keyof typeof AnimationSpline; } declare const HighlightMarker: ({ children, highlightVariant, highlightColor, animationDirection, animationDuration, animationOffset, animationEffect, }: HighlightMarkerProps) => react_jsx_runtime.JSX.Element; interface HighlightUnderlineProps { children: React.ReactNode; highlightVariant?: "1" | "2" | "3" | "random"; highlightColor?: CSSColor; animationOffset?: number; animationDirection?: "left" | "right" | "center"; animationDuration?: number; animationEffect?: keyof typeof AnimationSpline; } declare const HighlightUnderline: ({ children, highlightVariant, highlightColor, animationDirection, animationDuration, animationOffset, animationEffect, }: HighlightUnderlineProps) => react_jsx_runtime.JSX.Element; type RGB = `rgb(${number}, ${number}, ${number})` | `rgb(${number},${number},${number})`; type RGBA = `rgba(${number}, ${number}, ${number}, ${number})` | `rgba(${number},${number},${number},${number})`; type HEX = `#${string}`; type HSLA = `hsla(${number}, ${number}%, ${number}%, ${number})` | `hsla(${number},${number}%,${number}%,${number})`; type CSSColor = RGB | RGBA | HEX | HSLA; type AnimationEasing = "none" | "ease" | "ease-in" | "ease-out" | "ease-in-out"; declare const AnimationSpline: { none: { [K in never]: never; }; } & Record<Exclude<AnimationEasing, "none">, { keyTimes: string; keySplines: string; calcMode: string; }>; export { AnimationSpline, HighlightMarker, HighlightProvider, HighlightUnderline }; export type { CSSColor };