Pacekit GSAP Animation Components
repository·main·Indexed 43 days ago
https://github.com/pacekit/gsapA library of animated GSAP components version 1.0.0 designed for smooth integration into applications. Features a variety of UI elements including AI-focused components like ResponseWriter, ModalSelector, and TokenCounter, as well as visual effects such as AnimatedStack, DrawLineText, and DotLoader.
What's inside Pacekit GSAP
- PaceUI - GSAP is a collection of animated components and design blocks designed for React projects. Unlike traditional component libraries, it follows a 'copy and paste' philosophy similar to Shadcn, providing reusable code that you drop directly into your project. It is built to provide smooth interactions and rich detail using GSAP for animations, Lucide for icons, and Shiki for code highlighting.
Use the RevealOnScroll component
mainThe
RevealOnScrollcomponent allows you to animate content into view as the user scrolls. It supports several entry effects including fading, sliding, zooming, and blurring. Use thetypeprop to select the desired animation style.<RevealOnScroll type="slideInRight"> {/* Your content to animate */} </RevealOnScroll>Use the LiquidGlass component
mainThe
LiquidGlasscomponent provides a smooth glass effect with a subtle blur, suitable for UI highlights and overlays. You can customize the appearance using several props to control dimensions, corner rounding, color tint, and blur intensity.<LiquidGlass width={200} height={200} borderRadius={16} tintOpacity={0.2} blur={10} />Use the ModalAbilitySelector component
mainTheModalAbilitySelectoris a compact UI component designed for toggling abilities, featuring icons and support for custom styling. It is typically used within AI-related modal interfaces to allow users to select specific capabilities.Use the MouseWaveText component
mainThe
MouseWaveTextcomponent creates a wave-like bounce effect on text that reacts as the mouse moves across it. It is inspired by Tom Miller's work.<MouseWaveText text="Your Text Here" />Use the ScrambleText component
mainTheScrambleTextcomponent provides a hover-triggered text effect that scrambles and restores characters with smooth motion. By default, it scrambles characters on load and uses randomized character selection.Use the FlipReveal component
mainThe
FlipRevealcomponent is an animated container that reveals or hides items using GSAP Flip transitions. It relies on specific keys to manage the transition state of its children.// Example usage pattern based on documentation structure <FlipReveal keys={['item1', 'item2']}> <FlipRevealItem flipKey="item1">Content</FlipRevealItem> </FlipReveal>Install @paceui-gsap components
mainThe
@paceui-gsaplibrary follows the same installation pattern asshadcn/ui. To use it, you must first initialize your project withshadcn, then register the@paceui-gsapregistry in yourcomponents.jsonfile, and finally use theaddcommand to pull in specific components.1. Initialize your project
Run the
initcommand to create a new Next.js project or configure an existing one:npx shadcn@latest init2. Register the @paceui-gsap registry
Add the
@paceui-gsapregistry to theregistriesobject in yourcomponents.jsonfile. This allows the CLI to locate the component definitions.{ "registries": { "@paceui-gsap": "https://gsap.paceui.com/r/{name}.json" } }3. Add components
Use the
addcommand to install specific components from the registry. For example, to add theTextRevealcomponent:npx shadcn@latest add @paceui-gsap/text-revealnpx shadcn@latest init # Then update components.json # Then add components: npx shadcn@latest add @paceui-gsap/text-revealUse the TextFallButton component
mainThe
TextFallButtonis a button component featuring dynamic text that performs a smooth, elastic falling motion. By default, the animation triggers both when the component loads and when the user hovers over it. You can control these behaviors using theeffectOnHoverandeffectOnLoadprops.<TextFallButton effectOnHover={true} effectOnLoad={true} > Button Text </TextFallButton>Install the Overlay Effect component
mainYou can install the
OverlayEffectcomponent using the shadcn CLI or by manual installation.Using CLI
Run the following command to add the component directly to your project:
npx shadcn@latest add @paceui-ui/overlay-effectManual Installation
- Install the required dependencies:
npm install gsap @gsap/react- Copy the component source code into your project.
- Update the import paths within the component to match your project's directory structure.
Use the DotLoader component
mainThe
DotLoaderis a compact 7x7 dot grid loader designed to visualize frame sequences or loading states using smooth animations. It accepts configuration via props to control the animation sequence, styling, and playback behavior.<DotLoader frames={[[0,0], [0,1], [1,1]]} duration={100} play={true} repeatCount={-1} />Add icons or spinners to FillableButton
mainWhen adding an icon or a
<Spinner />component inside aFillableButton, you must add thedata-iconattribute to ensure correct spacing:- Use
data-icon="inline-start"to place the icon/spinner at the beginning. - Use
data-icon="inline-end"to place the icon/spinner at the end.
// Example for a loading state <FillableButton> <Spinner data-icon="inline-start" /> Loading... </FillableButton>- Use