Getting Started
Components
✔ Scaffolding project in /path/to/my-app...✔ Done. Now run:npm installnpm run dev📁 Created files:- src/App.tsx- vite.config.ts- tsconfig.jsonOn branch mainYour branch is up to date with origin/main.Changes not staged for commit:modified: src/components/Button.tsx[main abc1234] Update Button component1 file changed, 5 insertions(+), 2 deletions(-)import {
AnimatedSpan,
Terminal,
TypingAnimation,
} from "@/components/ui/terminal"<Terminal>
<TypingAnimation>pnpm dlx shadcn@latest init</TypingAnimation>
<AnimatedSpan>✔ Preflight checks.</AnimatedSpan>
<AnimatedSpan>✔ Validating Tailwind CSS.</AnimatedSpan>
<TypingAnimation>Success! Project initialization completed.</TypingAnimation>
</Terminal>The terminal sequences its children automatically. Each TypingAnimation or AnimatedSpan starts when the previous finishes. Manual delay props are optional and typically unnecessary.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Terminal content: a list of TypingAnimation/AnimatedSpan. |
className | string | - | Custom CSS class for styling. |
sequence | boolean | true | Enable auto sequencing so each line starts after the previous. |
startOnView | boolean | true | Start sequencing when the terminal enters the viewport. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | - | Content to be faded in. |
className | string | - | Custom CSS class for styling. |
delay | number | 0 | Delay in ms before animation starts (used when sequence is false). |
startOnView | boolean | false | If true, waits for viewport visibility before animating when unsequenced. |
| Prop | Type | Default | Description |
|---|---|---|---|
children | string | - | Text to be typed. |
className | string | - | Custom CSS class for styling. |
duration | number | 60 | Milliseconds per character. |
delay | number | 0 | Delay in ms before typing starts (used when sequence is false). |
as | React.ElementType | "span" | The component type to render. |
startOnView | boolean | true | If true, waits for viewport visibility before typing when unsequenced. |