@arolariu/components
Version:
🎨 70+ beautiful, accessible React components built on Base UI. TypeScript-first, CSS Modules styling, tree-shakeable, SSR-ready. Perfect for modern web apps, design systems & rapid prototyping. Zero config, maximum flexibility! ⚡
53 lines • 2.09 kB
TypeScript
import * as React from "react";
/** Single word definition consumed by the typewriter components. */
export interface TypewriterWord {
/** Word content split into animated characters at render time. @default undefined */
text: string;
/** Additional CSS classes merged with each rendered character. @default undefined */
className?: string;
}
/** Props accepted by {@link TypewriterText} and {@link TypewriterTextSmooth}. */
export interface TypewriterTextProps {
/** Ordered list of words rendered by the typewriter animation. @default undefined */
words: ReadonlyArray<TypewriterWord>;
/** Additional CSS classes merged with the outer container. @default undefined */
className?: string;
/** Additional CSS classes merged with the blinking cursor element. @default undefined */
cursorClassName?: string;
}
/**
* Reveals text one character at a time with a stepped typewriter animation.
*
* @remarks
* - Animated component using the `motion` library
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
* - Client-side only (`"use client"` directive)
*
* @example
* ```tsx
* <TypewriterText words={[{text: "Hello"}, {text: "world"}]} />
* ```
*
* @see {@link TypewriterTextProps} for available props
*/
declare const TypewriterText: React.ForwardRefExoticComponent<TypewriterTextProps & React.RefAttributes<HTMLDivElement>>;
/**
* Reveals text with a continuous width-based typewriter sweep animation.
*
* @remarks
* - Animated component using the `motion` library
* - Renders a `<div>` element
* - Styling via CSS Modules with `--ac-*` custom properties
* - Client-side only (`"use client"` directive)
*
* @example
* ```tsx
* <TypewriterTextSmooth words={[{text: "Smooth"}, {text: "typing"}]} />
* ```
*
* @see {@link TypewriterTextProps} for available props
*/
declare const TypewriterTextSmooth: React.ForwardRefExoticComponent<TypewriterTextProps & React.RefAttributes<HTMLDivElement>>;
export { TypewriterText, TypewriterTextSmooth };
//# sourceMappingURL=typewriter.d.ts.map