fancy-ui-svelte 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +198 -0
- package/dist/fancy-ui/_template/Component.svelte +110 -0
- package/dist/fancy-ui/_template/Component.svelte.d.ts +16 -0
- package/dist/fancy-ui/_template/README.md +279 -0
- package/dist/fancy-ui/_template/index.d.ts +13 -0
- package/dist/fancy-ui/_template/index.js +27 -0
- package/dist/fancy-ui/_template/types.d.ts +53 -0
- package/dist/fancy-ui/_template/types.js +12 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.svelte +166 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.svelte.d.ts +4 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.test.d.ts +1 -0
- package/dist/fancy-ui/animated-beam/AnimatedBeam.test.js +49 -0
- package/dist/fancy-ui/animated-beam/README.md +38 -0
- package/dist/fancy-ui/animated-beam/index.d.ts +2 -0
- package/dist/fancy-ui/animated-beam/index.js +1 -0
- package/dist/fancy-ui/animated-beam/types.d.ts +19 -0
- package/dist/fancy-ui/animated-beam/types.js +1 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.svelte +196 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.svelte.d.ts +29 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.test.d.ts +1 -0
- package/dist/fancy-ui/animated-testimonials/AnimatedTestimonials.test.js +92 -0
- package/dist/fancy-ui/animated-testimonials/index.d.ts +2 -0
- package/dist/fancy-ui/animated-testimonials/index.js +1 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.svelte +97 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.svelte.d.ts +15 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.test.d.ts +1 -0
- package/dist/fancy-ui/animated-tooltip/AnimatedTooltip.test.js +67 -0
- package/dist/fancy-ui/animated-tooltip/index.d.ts +2 -0
- package/dist/fancy-ui/animated-tooltip/index.js +1 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCard.svelte +226 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCard.svelte.d.ts +27 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.svelte +49 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.svelte.d.ts +11 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.test.d.ts +1 -0
- package/dist/fancy-ui/apple-card-carousel/AppleCardCarousel.test.js +85 -0
- package/dist/fancy-ui/apple-card-carousel/index.d.ts +3 -0
- package/dist/fancy-ui/apple-card-carousel/index.js +2 -0
- package/dist/fancy-ui/bento-grid/BentoGrid.svelte +21 -0
- package/dist/fancy-ui/bento-grid/BentoGrid.svelte.d.ts +7 -0
- package/dist/fancy-ui/bento-grid/BentoGridCard.svelte +70 -0
- package/dist/fancy-ui/bento-grid/BentoGridCard.svelte.d.ts +12 -0
- package/dist/fancy-ui/bento-grid/BentoGridItem.svelte +39 -0
- package/dist/fancy-ui/bento-grid/BentoGridItem.svelte.d.ts +10 -0
- package/dist/fancy-ui/bento-grid/README.md +51 -0
- package/dist/fancy-ui/bento-grid/index.d.ts +3 -0
- package/dist/fancy-ui/bento-grid/index.js +3 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.svelte +163 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.svelte.d.ts +11 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.test.d.ts +1 -0
- package/dist/fancy-ui/bg-falling-stars/FallingStarsBg.test.js +50 -0
- package/dist/fancy-ui/bg-falling-stars/README.md +22 -0
- package/dist/fancy-ui/bg-falling-stars/index.d.ts +2 -0
- package/dist/fancy-ui/bg-falling-stars/index.js +1 -0
- package/dist/fancy-ui/bg-stars/README.md +41 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.svelte +205 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.svelte.d.ts +33 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.test.d.ts +1 -0
- package/dist/fancy-ui/bg-stars/StarsBackground.test.js +46 -0
- package/dist/fancy-ui/bg-stars/index.d.ts +1 -0
- package/dist/fancy-ui/bg-stars/index.js +1 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.svelte +126 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.svelte.d.ts +18 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.test.d.ts +1 -0
- package/dist/fancy-ui/blur-reveal/BlurReveal.test.js +47 -0
- package/dist/fancy-ui/blur-reveal/README.md +41 -0
- package/dist/fancy-ui/blur-reveal/index.d.ts +2 -0
- package/dist/fancy-ui/blur-reveal/index.js +2 -0
- package/dist/fancy-ui/book/Book.svelte +89 -0
- package/dist/fancy-ui/book/Book.svelte.d.ts +15 -0
- package/dist/fancy-ui/book/Book.test.d.ts +1 -0
- package/dist/fancy-ui/book/Book.test.js +47 -0
- package/dist/fancy-ui/book/BookDescription.svelte +17 -0
- package/dist/fancy-ui/book/BookDescription.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/BookHeader.svelte +17 -0
- package/dist/fancy-ui/book/BookHeader.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/BookTitle.svelte +17 -0
- package/dist/fancy-ui/book/BookTitle.svelte.d.ts +8 -0
- package/dist/fancy-ui/book/README.md +34 -0
- package/dist/fancy-ui/book/index.d.ts +128 -0
- package/dist/fancy-ui/book/index.js +46 -0
- package/dist/fancy-ui/border-beam/BorderBeam.svelte +85 -0
- package/dist/fancy-ui/border-beam/BorderBeam.svelte.d.ts +27 -0
- package/dist/fancy-ui/border-beam/BorderBeam.test.d.ts +1 -0
- package/dist/fancy-ui/border-beam/BorderBeam.test.js +64 -0
- package/dist/fancy-ui/border-beam/index.d.ts +2 -0
- package/dist/fancy-ui/border-beam/index.js +2 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.svelte +73 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.svelte.d.ts +24 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.test.d.ts +1 -0
- package/dist/fancy-ui/box-reveal/BoxReveal.test.js +66 -0
- package/dist/fancy-ui/box-reveal/README.md +24 -0
- package/dist/fancy-ui/box-reveal/index.d.ts +2 -0
- package/dist/fancy-ui/box-reveal/index.js +2 -0
- package/dist/fancy-ui/card-3d/CardBody.svelte +16 -0
- package/dist/fancy-ui/card-3d/CardBody.svelte.d.ts +7 -0
- package/dist/fancy-ui/card-3d/CardContainer.svelte +53 -0
- package/dist/fancy-ui/card-3d/CardContainer.svelte.d.ts +8 -0
- package/dist/fancy-ui/card-3d/CardItem.svelte +49 -0
- package/dist/fancy-ui/card-3d/CardItem.svelte.d.ts +14 -0
- package/dist/fancy-ui/card-3d/README.md +52 -0
- package/dist/fancy-ui/card-3d/index.d.ts +3 -0
- package/dist/fancy-ui/card-3d/index.js +3 -0
- package/dist/fancy-ui/card-spotlight/CardSpotlight.svelte +59 -0
- package/dist/fancy-ui/card-spotlight/CardSpotlight.svelte.d.ts +11 -0
- package/dist/fancy-ui/card-spotlight/README.md +24 -0
- package/dist/fancy-ui/card-spotlight/index.d.ts +1 -0
- package/dist/fancy-ui/card-spotlight/index.js +1 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.svelte +78 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.svelte.d.ts +22 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.test.d.ts +1 -0
- package/dist/fancy-ui/colourful-text/ColourfulText.test.js +53 -0
- package/dist/fancy-ui/colourful-text/README.md +21 -0
- package/dist/fancy-ui/colourful-text/index.d.ts +2 -0
- package/dist/fancy-ui/colourful-text/index.js +2 -0
- package/dist/fancy-ui/compare/Compare.svelte +304 -0
- package/dist/fancy-ui/compare/Compare.svelte.d.ts +25 -0
- package/dist/fancy-ui/compare/Compare.test.d.ts +1 -0
- package/dist/fancy-ui/compare/Compare.test.js +57 -0
- package/dist/fancy-ui/compare/README.md +97 -0
- package/dist/fancy-ui/compare/StarField.svelte +108 -0
- package/dist/fancy-ui/compare/StarField.svelte.d.ts +7 -0
- package/dist/fancy-ui/compare/index.d.ts +2 -0
- package/dist/fancy-ui/compare/index.js +2 -0
- package/dist/fancy-ui/confetti/Confetti.svelte +60 -0
- package/dist/fancy-ui/confetti/Confetti.svelte.d.ts +14 -0
- package/dist/fancy-ui/confetti/Confetti.test.d.ts +1 -0
- package/dist/fancy-ui/confetti/Confetti.test.js +39 -0
- package/dist/fancy-ui/confetti/ConfettiButton.svelte +41 -0
- package/dist/fancy-ui/confetti/ConfettiButton.svelte.d.ts +9 -0
- package/dist/fancy-ui/confetti/README.md +22 -0
- package/dist/fancy-ui/confetti/index.d.ts +2 -0
- package/dist/fancy-ui/confetti/index.js +2 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.svelte +82 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.svelte.d.ts +9 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.test.d.ts +1 -0
- package/dist/fancy-ui/container-scroll/ContainerScroll.test.js +34 -0
- package/dist/fancy-ui/container-scroll/README.md +28 -0
- package/dist/fancy-ui/container-scroll/index.d.ts +1 -0
- package/dist/fancy-ui/container-scroll/index.js +1 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.svelte +78 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.svelte.d.ts +10 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.test.d.ts +1 -0
- package/dist/fancy-ui/container-text-flip/ContainerTextFlip.test.js +46 -0
- package/dist/fancy-ui/container-text-flip/README.md +22 -0
- package/dist/fancy-ui/container-text-flip/index.d.ts +1 -0
- package/dist/fancy-ui/container-text-flip/index.js +1 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.svelte +232 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.svelte.d.ts +11 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.test.d.ts +1 -0
- package/dist/fancy-ui/direction-aware-hover/DirectionAwareHover.test.js +78 -0
- package/dist/fancy-ui/direction-aware-hover/README.md +47 -0
- package/dist/fancy-ui/direction-aware-hover/index.d.ts +1 -0
- package/dist/fancy-ui/direction-aware-hover/index.js +1 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.svelte +224 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.svelte.d.ts +19 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.test.d.ts +1 -0
- package/dist/fancy-ui/displacement-text/DisplacementText.test.js +144 -0
- package/dist/fancy-ui/displacement-text/index.d.ts +2 -0
- package/dist/fancy-ui/displacement-text/index.js +1 -0
- package/dist/fancy-ui/dock/Dock.svelte +87 -0
- package/dist/fancy-ui/dock/Dock.svelte.d.ts +12 -0
- package/dist/fancy-ui/dock/Dock.test.d.ts +1 -0
- package/dist/fancy-ui/dock/Dock.test.js +51 -0
- package/dist/fancy-ui/dock/DockIcon.svelte +50 -0
- package/dist/fancy-ui/dock/DockIcon.svelte.d.ts +7 -0
- package/dist/fancy-ui/dock/DockSeparator.svelte +21 -0
- package/dist/fancy-ui/dock/DockSeparator.svelte.d.ts +6 -0
- package/dist/fancy-ui/dock/README.md +57 -0
- package/dist/fancy-ui/dock/index.d.ts +4 -0
- package/dist/fancy-ui/dock/index.js +4 -0
- package/dist/fancy-ui/dock/types.d.ts +14 -0
- package/dist/fancy-ui/dock/types.js +1 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.svelte +154 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.svelte.d.ts +27 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.test.d.ts +1 -0
- package/dist/fancy-ui/flickering-grid/FlickeringGrid.test.js +34 -0
- package/dist/fancy-ui/flickering-grid/README.md +24 -0
- package/dist/fancy-ui/flickering-grid/index.d.ts +2 -0
- package/dist/fancy-ui/flickering-grid/index.js +2 -0
- package/dist/fancy-ui/flip-card/FlipCard.svelte +48 -0
- package/dist/fancy-ui/flip-card/FlipCard.svelte.d.ts +10 -0
- package/dist/fancy-ui/flip-card/FlipCard.test.d.ts +1 -0
- package/dist/fancy-ui/flip-card/FlipCard.test.js +36 -0
- package/dist/fancy-ui/flip-card/README.md +26 -0
- package/dist/fancy-ui/flip-card/index.d.ts +1 -0
- package/dist/fancy-ui/flip-card/index.js +1 -0
- package/dist/fancy-ui/flip-words/FlipWords.svelte +135 -0
- package/dist/fancy-ui/flip-words/FlipWords.svelte.d.ts +18 -0
- package/dist/fancy-ui/flip-words/FlipWords.test.d.ts +1 -0
- package/dist/fancy-ui/flip-words/FlipWords.test.js +50 -0
- package/dist/fancy-ui/flip-words/README.md +17 -0
- package/dist/fancy-ui/flip-words/index.d.ts +2 -0
- package/dist/fancy-ui/flip-words/index.js +2 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte +1378 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.svelte.d.ts +25 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.test.d.ts +1 -0
- package/dist/fancy-ui/fluid-cursor/FluidCursor.test.js +41 -0
- package/dist/fancy-ui/fluid-cursor/README.md +34 -0
- package/dist/fancy-ui/fluid-cursor/index.d.ts +1 -0
- package/dist/fancy-ui/fluid-cursor/index.js +1 -0
- package/dist/fancy-ui/focus/Focus.svelte +177 -0
- package/dist/fancy-ui/focus/Focus.svelte.d.ts +12 -0
- package/dist/fancy-ui/focus/Focus.test.d.ts +1 -0
- package/dist/fancy-ui/focus/Focus.test.js +48 -0
- package/dist/fancy-ui/focus/README.md +21 -0
- package/dist/fancy-ui/focus/index.d.ts +1 -0
- package/dist/fancy-ui/focus/index.js +1 -0
- package/dist/fancy-ui/glare-card/GlareCard.svelte +133 -0
- package/dist/fancy-ui/glare-card/GlareCard.svelte.d.ts +8 -0
- package/dist/fancy-ui/glare-card/GlareCard.test.d.ts +1 -0
- package/dist/fancy-ui/glare-card/GlareCard.test.js +40 -0
- package/dist/fancy-ui/glare-card/README.md +24 -0
- package/dist/fancy-ui/glare-card/index.d.ts +1 -0
- package/dist/fancy-ui/glare-card/index.js +1 -0
- package/dist/fancy-ui/glow-border/GlowBorder.svelte +67 -0
- package/dist/fancy-ui/glow-border/GlowBorder.svelte.d.ts +10 -0
- package/dist/fancy-ui/glow-border/GlowBorder.test.d.ts +1 -0
- package/dist/fancy-ui/glow-border/GlowBorder.test.js +57 -0
- package/dist/fancy-ui/glow-border/README.md +54 -0
- package/dist/fancy-ui/glow-border/index.d.ts +1 -0
- package/dist/fancy-ui/glow-border/index.js +1 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.svelte +182 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.svelte.d.ts +15 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.test.d.ts +1 -0
- package/dist/fancy-ui/glowing-effect/GlowingEffect.test.js +68 -0
- package/dist/fancy-ui/glowing-effect/README.md +29 -0
- package/dist/fancy-ui/glowing-effect/index.d.ts +1 -0
- package/dist/fancy-ui/glowing-effect/index.js +1 -0
- package/dist/fancy-ui/gradient-button/GradientButton.svelte +103 -0
- package/dist/fancy-ui/gradient-button/GradientButton.svelte.d.ts +24 -0
- package/dist/fancy-ui/gradient-button/GradientButton.test.d.ts +1 -0
- package/dist/fancy-ui/gradient-button/GradientButton.test.js +65 -0
- package/dist/fancy-ui/gradient-button/README.md +10 -0
- package/dist/fancy-ui/gradient-button/index.d.ts +2 -0
- package/dist/fancy-ui/gradient-button/index.js +2 -0
- package/dist/fancy-ui/hyper-text/HyperText.svelte +112 -0
- package/dist/fancy-ui/hyper-text/HyperText.svelte.d.ts +20 -0
- package/dist/fancy-ui/hyper-text/HyperText.test.d.ts +1 -0
- package/dist/fancy-ui/hyper-text/HyperText.test.js +39 -0
- package/dist/fancy-ui/hyper-text/README.md +19 -0
- package/dist/fancy-ui/hyper-text/index.d.ts +2 -0
- package/dist/fancy-ui/hyper-text/index.js +2 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.svelte +89 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.svelte.d.ts +9 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.test.d.ts +1 -0
- package/dist/fancy-ui/image-trail-cursor/ImageTrailCursor.test.js +60 -0
- package/dist/fancy-ui/image-trail-cursor/README.md +36 -0
- package/dist/fancy-ui/image-trail-cursor/index.d.ts +3 -0
- package/dist/fancy-ui/image-trail-cursor/index.js +1 -0
- package/dist/fancy-ui/image-trail-cursor/trail-variants.d.ts +107 -0
- package/dist/fancy-ui/image-trail-cursor/trail-variants.js +703 -0
- package/dist/fancy-ui/index.d.ts +52 -0
- package/dist/fancy-ui/index.js +64 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.svelte +71 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.svelte.d.ts +15 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.test.d.ts +1 -0
- package/dist/fancy-ui/interactive-grid-pattern/InteractiveGridPattern.test.js +47 -0
- package/dist/fancy-ui/interactive-grid-pattern/README.md +30 -0
- package/dist/fancy-ui/interactive-grid-pattern/index.d.ts +2 -0
- package/dist/fancy-ui/interactive-grid-pattern/index.js +2 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.svelte +75 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.svelte.d.ts +14 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.test.d.ts +1 -0
- package/dist/fancy-ui/interactive-hover-button/InteractiveHoverButton.test.js +64 -0
- package/dist/fancy-ui/interactive-hover-button/README.md +28 -0
- package/dist/fancy-ui/interactive-hover-button/index.d.ts +2 -0
- package/dist/fancy-ui/interactive-hover-button/index.js +2 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.svelte +58 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.svelte.d.ts +17 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.test.d.ts +1 -0
- package/dist/fancy-ui/letter-pullup/LetterPullup.test.js +49 -0
- package/dist/fancy-ui/letter-pullup/README.md +18 -0
- package/dist/fancy-ui/letter-pullup/index.d.ts +2 -0
- package/dist/fancy-ui/letter-pullup/index.js +2 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.svelte +450 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.svelte.d.ts +35 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.test.d.ts +1 -0
- package/dist/fancy-ui/line-hover-link/LineHoverLink.test.js +55 -0
- package/dist/fancy-ui/line-hover-link/index.d.ts +2 -0
- package/dist/fancy-ui/line-hover-link/index.js +1 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.svelte +63 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.svelte.d.ts +9 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.test.d.ts +1 -0
- package/dist/fancy-ui/line-shadow-text/LineShadowText.test.js +59 -0
- package/dist/fancy-ui/line-shadow-text/README.md +12 -0
- package/dist/fancy-ui/line-shadow-text/index.d.ts +2 -0
- package/dist/fancy-ui/line-shadow-text/index.js +1 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.svelte +204 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.svelte.d.ts +23 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.test.d.ts +1 -0
- package/dist/fancy-ui/liquid-glass/LiquidGlass.test.js +48 -0
- package/dist/fancy-ui/liquid-glass/README.md +34 -0
- package/dist/fancy-ui/liquid-glass/index.d.ts +1 -0
- package/dist/fancy-ui/liquid-glass/index.js +1 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.svelte +61 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.svelte.d.ts +15 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.test.d.ts +1 -0
- package/dist/fancy-ui/logo-cloud/AnimatedLogoCloud.test.js +59 -0
- package/dist/fancy-ui/logo-cloud/IconLogoCloud.svelte +31 -0
- package/dist/fancy-ui/logo-cloud/IconLogoCloud.svelte.d.ts +11 -0
- package/dist/fancy-ui/logo-cloud/README.md +41 -0
- package/dist/fancy-ui/logo-cloud/StaticLogoCloud.svelte +31 -0
- package/dist/fancy-ui/logo-cloud/StaticLogoCloud.svelte.d.ts +11 -0
- package/dist/fancy-ui/logo-cloud/index.d.ts +4 -0
- package/dist/fancy-ui/logo-cloud/index.js +4 -0
- package/dist/fancy-ui/marquee/Marquee.svelte +70 -0
- package/dist/fancy-ui/marquee/Marquee.svelte.d.ts +11 -0
- package/dist/fancy-ui/marquee/Marquee.test.d.ts +1 -0
- package/dist/fancy-ui/marquee/Marquee.test.js +46 -0
- package/dist/fancy-ui/marquee/ReviewCard.svelte +25 -0
- package/dist/fancy-ui/marquee/ReviewCard.svelte.d.ts +9 -0
- package/dist/fancy-ui/marquee/index.d.ts +2 -0
- package/dist/fancy-ui/marquee/index.js +2 -0
- package/dist/fancy-ui/meteors/Meteors.svelte +59 -0
- package/dist/fancy-ui/meteors/Meteors.svelte.d.ts +15 -0
- package/dist/fancy-ui/meteors/Meteors.test.d.ts +1 -0
- package/dist/fancy-ui/meteors/Meteors.test.js +48 -0
- package/dist/fancy-ui/meteors/README.md +18 -0
- package/dist/fancy-ui/meteors/index.d.ts +2 -0
- package/dist/fancy-ui/meteors/index.js +2 -0
- package/dist/fancy-ui/neon-border/NeonBorder.svelte +135 -0
- package/dist/fancy-ui/neon-border/NeonBorder.svelte.d.ts +24 -0
- package/dist/fancy-ui/neon-border/NeonBorder.test.d.ts +1 -0
- package/dist/fancy-ui/neon-border/NeonBorder.test.js +80 -0
- package/dist/fancy-ui/neon-border/README.md +27 -0
- package/dist/fancy-ui/neon-border/index.d.ts +2 -0
- package/dist/fancy-ui/neon-border/index.js +2 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.svelte +126 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.svelte.d.ts +24 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.test.d.ts +1 -0
- package/dist/fancy-ui/number-ticker/NumberTicker.test.js +64 -0
- package/dist/fancy-ui/number-ticker/README.md +22 -0
- package/dist/fancy-ui/number-ticker/index.d.ts +2 -0
- package/dist/fancy-ui/number-ticker/index.js +2 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.svelte +96 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.svelte.d.ts +18 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.test.d.ts +1 -0
- package/dist/fancy-ui/rainbow-button/RainbowButton.test.js +51 -0
- package/dist/fancy-ui/rainbow-button/index.d.ts +2 -0
- package/dist/fancy-ui/rainbow-button/index.js +2 -0
- package/dist/fancy-ui/registry.d.ts +72 -0
- package/dist/fancy-ui/registry.js +643 -0
- package/dist/fancy-ui/ripple/README.md +16 -0
- package/dist/fancy-ui/ripple/Ripple.svelte +64 -0
- package/dist/fancy-ui/ripple/Ripple.svelte.d.ts +13 -0
- package/dist/fancy-ui/ripple/Ripple.test.d.ts +1 -0
- package/dist/fancy-ui/ripple/Ripple.test.js +81 -0
- package/dist/fancy-ui/ripple/index.d.ts +1 -0
- package/dist/fancy-ui/ripple/index.js +1 -0
- package/dist/fancy-ui/ripple-button/RippleButton.svelte +111 -0
- package/dist/fancy-ui/ripple-button/RippleButton.svelte.d.ts +15 -0
- package/dist/fancy-ui/ripple-button/RippleButton.test.d.ts +1 -0
- package/dist/fancy-ui/ripple-button/RippleButton.test.js +44 -0
- package/dist/fancy-ui/ripple-button/index.d.ts +2 -0
- package/dist/fancy-ui/ripple-button/index.js +2 -0
- package/dist/fancy-ui/shimmer-button/README.md +10 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.svelte +115 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.svelte.d.ts +22 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.test.d.ts +1 -0
- package/dist/fancy-ui/shimmer-button/ShimmerButton.test.js +69 -0
- package/dist/fancy-ui/shimmer-button/index.d.ts +2 -0
- package/dist/fancy-ui/shimmer-button/index.js +2 -0
- package/dist/fancy-ui/smooth-cursor/README.md +23 -0
- package/dist/fancy-ui/smooth-cursor/SmoothCursor.svelte +224 -0
- package/dist/fancy-ui/smooth-cursor/SmoothCursor.svelte.d.ts +20 -0
- package/dist/fancy-ui/smooth-cursor/index.d.ts +2 -0
- package/dist/fancy-ui/smooth-cursor/index.js +1 -0
- package/dist/fancy-ui/sparkles/README.md +15 -0
- package/dist/fancy-ui/sparkles/Sparkles.svelte +123 -0
- package/dist/fancy-ui/sparkles/Sparkles.svelte.d.ts +12 -0
- package/dist/fancy-ui/sparkles/Sparkles.test.d.ts +1 -0
- package/dist/fancy-ui/sparkles/Sparkles.test.js +66 -0
- package/dist/fancy-ui/sparkles/index.d.ts +1 -0
- package/dist/fancy-ui/sparkles/index.js +1 -0
- package/dist/fancy-ui/sparkles-text/README.md +19 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.svelte +112 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.svelte.d.ts +22 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.test.d.ts +1 -0
- package/dist/fancy-ui/sparkles-text/SparklesText.test.js +54 -0
- package/dist/fancy-ui/sparkles-text/index.d.ts +2 -0
- package/dist/fancy-ui/sparkles-text/index.js +2 -0
- package/dist/fancy-ui/tailwind.css +3 -0
- package/dist/fancy-ui/text-generate-effect/README.md +14 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.svelte +66 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.svelte.d.ts +11 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.test.d.ts +1 -0
- package/dist/fancy-ui/text-generate-effect/TextGenerateEffect.test.js +73 -0
- package/dist/fancy-ui/text-generate-effect/index.d.ts +2 -0
- package/dist/fancy-ui/text-generate-effect/index.js +1 -0
- package/dist/fancy-ui/text-reveal-card/README.md +36 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.svelte +112 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.svelte.d.ts +12 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.test.d.ts +1 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealCard.test.js +34 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealStars.svelte +76 -0
- package/dist/fancy-ui/text-reveal-card/TextRevealStars.svelte.d.ts +7 -0
- package/dist/fancy-ui/text-reveal-card/index.d.ts +2 -0
- package/dist/fancy-ui/text-reveal-card/index.js +2 -0
- package/dist/fancy-ui/timeline/README.md +56 -0
- package/dist/fancy-ui/timeline/Timeline.svelte +141 -0
- package/dist/fancy-ui/timeline/Timeline.svelte.d.ts +20 -0
- package/dist/fancy-ui/timeline/Timeline.test.d.ts +1 -0
- package/dist/fancy-ui/timeline/Timeline.test.js +63 -0
- package/dist/fancy-ui/timeline/index.d.ts +2 -0
- package/dist/fancy-ui/timeline/index.js +2 -0
- package/dist/fancy-ui/tracing-beam/README.md +24 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.svelte +156 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.svelte.d.ts +8 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.test.d.ts +1 -0
- package/dist/fancy-ui/tracing-beam/TracingBeam.test.js +61 -0
- package/dist/fancy-ui/tracing-beam/index.d.ts +1 -0
- package/dist/fancy-ui/tracing-beam/index.js +1 -0
- package/dist/types.d.ts +87 -0
- package/dist/types.js +6 -0
- package/dist/utils.d.ts +12 -0
- package/dist/utils.js +5 -0
- package/package.json +105 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 RamaHerbin
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# fancy-ui
|
|
2
|
+
|
|
3
|
+
Beautiful animation and UI components for **Svelte 5**.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+

|
|
7
|
+

|
|
8
|
+

|
|
9
|
+

|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://fancy-ui.rama.app">
|
|
13
|
+
<img src=".github/demo-gallery.png" alt="fancy-ui demo gallery" width="800" />
|
|
14
|
+
</a>
|
|
15
|
+
</p>
|
|
16
|
+
|
|
17
|
+
<p align="center">
|
|
18
|
+
<a href="https://fancy-ui.rama.app"><strong>Live Demo</strong></a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- **Svelte 5 Runes** — Built with `$state`, `$derived`, `$effect`, and `$props`
|
|
24
|
+
- **Tailwind CSS 4** — Utility-first styling with theme tokens
|
|
25
|
+
- **TypeScript** — Fully typed props and events
|
|
26
|
+
- **52 Components** — Buttons, text animations, backgrounds, effects, and more
|
|
27
|
+
- **Dark Mode** — All components support light and dark themes
|
|
28
|
+
- **Tested** — Component tests with Vitest and Testing Library
|
|
29
|
+
|
|
30
|
+
## Components
|
|
31
|
+
|
|
32
|
+
### Buttons
|
|
33
|
+
|
|
34
|
+
| Component | Description | Demo |
|
|
35
|
+
|-----------|-------------|------|
|
|
36
|
+
| RainbowButton | Animated rainbow gradient border effect | [Demo](https://fancy-ui.rama.app/demo/rainbow-button) |
|
|
37
|
+
| RippleButton | Ripple click effect | [Demo](https://fancy-ui.rama.app/demo/ripple-button) |
|
|
38
|
+
| ShimmerButton | Rotating conic-gradient shimmer border | [Demo](https://fancy-ui.rama.app/demo/shimmer-button) |
|
|
39
|
+
| GradientButton | Rotating conic-gradient rainbow border | [Demo](https://fancy-ui.rama.app/demo/gradient-button) |
|
|
40
|
+
| InteractiveHoverButton | Hover effect revealing alternate content | [Demo](https://fancy-ui.rama.app/demo/interactive-hover-button) |
|
|
41
|
+
|
|
42
|
+
### Cards
|
|
43
|
+
|
|
44
|
+
| Component | Description | Demo |
|
|
45
|
+
|-----------|-------------|------|
|
|
46
|
+
| Card3D | 3D tilt card with mouse tracking | [Demo](https://fancy-ui.rama.app/demo/card-3d) |
|
|
47
|
+
| CardSpotlight | Spotlight effect following mouse | [Demo](https://fancy-ui.rama.app/demo/card-spotlight) |
|
|
48
|
+
| DirectionAwareHover | Overlay slides in from mouse entry direction | [Demo](https://fancy-ui.rama.app/demo/direction-aware-hover) |
|
|
49
|
+
| FlipCard | Two-sided card with flip animation | [Demo](https://fancy-ui.rama.app/demo/flip-card) |
|
|
50
|
+
| GlareCard | Glare reflection effect on hover | [Demo](https://fancy-ui.rama.app/demo/glare-card) |
|
|
51
|
+
| TextRevealCard | Text reveal on hover | [Demo](https://fancy-ui.rama.app/demo/text-reveal-card) |
|
|
52
|
+
|
|
53
|
+
### Text & Typography
|
|
54
|
+
|
|
55
|
+
| Component | Description | Demo |
|
|
56
|
+
|-----------|-------------|------|
|
|
57
|
+
| BlurReveal | Scroll-triggered blur-to-clear reveal | [Demo](https://fancy-ui.rama.app/demo/blur-reveal) |
|
|
58
|
+
| BoxReveal | Sliding colored box reveal animation | [Demo](https://fancy-ui.rama.app/demo/box-reveal) |
|
|
59
|
+
| ColourfulText | Per-character color animation | [Demo](https://fancy-ui.rama.app/demo/colourful-text) |
|
|
60
|
+
| ContainerTextFlip | Text flipping inside a container | [Demo](https://fancy-ui.rama.app/demo/container-text-flip) |
|
|
61
|
+
| FlipWords | Cycling word animation with per-letter effects | [Demo](https://fancy-ui.rama.app/demo/flip-words) |
|
|
62
|
+
| HyperText | Character scramble on hover | [Demo](https://fancy-ui.rama.app/demo/hyper-text) |
|
|
63
|
+
| LetterPullup | Staggered letter pull-up animation | [Demo](https://fancy-ui.rama.app/demo/letter-pullup) |
|
|
64
|
+
| LineShadowText | Text with animated line shadow | [Demo](https://fancy-ui.rama.app/demo/line-shadow-text) |
|
|
65
|
+
| NumberTicker | Animated number counter with easing | [Demo](https://fancy-ui.rama.app/demo/number-ticker) |
|
|
66
|
+
| SparklesText | Animated SVG sparkle stars overlay | [Demo](https://fancy-ui.rama.app/demo/sparkles-text) |
|
|
67
|
+
| TextGenerateEffect | Word-by-word text generation effect | [Demo](https://fancy-ui.rama.app/demo/text-generate-effect) |
|
|
68
|
+
|
|
69
|
+
### Backgrounds
|
|
70
|
+
|
|
71
|
+
| Component | Description | Demo |
|
|
72
|
+
|-----------|-------------|------|
|
|
73
|
+
| FallingStarsBg | Canvas 3D starfield with motion trails | [Demo](https://fancy-ui.rama.app/demo/bg-falling-stars) |
|
|
74
|
+
| FlickeringGrid | Canvas grid with flickering opacity | [Demo](https://fancy-ui.rama.app/demo/flickering-grid) |
|
|
75
|
+
| InteractiveGridPattern | SVG grid with hover highlights | [Demo](https://fancy-ui.rama.app/demo/interactive-grid-pattern) |
|
|
76
|
+
| StarsBackground | Starfield with parallax mouse tracking | [Demo](https://fancy-ui.rama.app/demo/bg-stars) |
|
|
77
|
+
|
|
78
|
+
### Effects & Animations
|
|
79
|
+
|
|
80
|
+
| Component | Description | Demo |
|
|
81
|
+
|-----------|-------------|------|
|
|
82
|
+
| AnimatedBeam | SVG beams connecting elements | [Demo](https://fancy-ui.rama.app/demo/animated-beam) |
|
|
83
|
+
| BorderBeam | Beam effect traveling around borders | [Demo](https://fancy-ui.rama.app/demo/border-beam) |
|
|
84
|
+
| Confetti | Configurable confetti burst | [Demo](https://fancy-ui.rama.app/demo/confetti) |
|
|
85
|
+
| FluidCursor | WebGL fluid simulation following cursor | [Demo](https://fancy-ui.rama.app/demo/fluid-cursor) |
|
|
86
|
+
| GlowBorder | Animated glowing border with gradients | [Demo](https://fancy-ui.rama.app/demo/glow-border) |
|
|
87
|
+
| GlowingEffect | Glowing highlight on hover | [Demo](https://fancy-ui.rama.app/demo/glowing-effect) |
|
|
88
|
+
| ImageTrailCursor | Cursor-following image trail (8 variants) | [Demo](https://fancy-ui.rama.app/demo/image-trail-cursor) |
|
|
89
|
+
| LiquidGlass | Liquid glass morphism effect | [Demo](https://fancy-ui.rama.app/demo/liquid-glass) |
|
|
90
|
+
| Meteors | Animated meteor shower effect | [Demo](https://fancy-ui.rama.app/demo/meteors) |
|
|
91
|
+
| NeonBorder | Dual-color neon glow border | [Demo](https://fancy-ui.rama.app/demo/neon-border) |
|
|
92
|
+
| Ripple | Expanding ripple rings | [Demo](https://fancy-ui.rama.app/demo/ripple) |
|
|
93
|
+
| SmoothCursor | Smooth lagging cursor follower | [Demo](https://fancy-ui.rama.app/demo/smooth-cursor) |
|
|
94
|
+
| Sparkles | Particle sparkle canvas | [Demo](https://fancy-ui.rama.app/demo/sparkles) |
|
|
95
|
+
| TracingBeam | Scroll-driven tracing beam | [Demo](https://fancy-ui.rama.app/demo/tracing-beam) |
|
|
96
|
+
|
|
97
|
+
### Layout
|
|
98
|
+
|
|
99
|
+
| Component | Description | Demo |
|
|
100
|
+
|-----------|-------------|------|
|
|
101
|
+
| BentoGrid | Bento-style responsive grid layout | [Demo](https://fancy-ui.rama.app/demo/bento-grid) |
|
|
102
|
+
| Book | 3D book flip animation | [Demo](https://fancy-ui.rama.app/demo/book) |
|
|
103
|
+
| ContainerScroll | 3D scroll perspective container | [Demo](https://fancy-ui.rama.app/demo/container-scroll) |
|
|
104
|
+
| Focus | Focus-expand card layout | [Demo](https://fancy-ui.rama.app/demo/focus) |
|
|
105
|
+
| Marquee | Infinite scrolling for text, images, or cards | [Demo](https://fancy-ui.rama.app/demo/marquee) |
|
|
106
|
+
|
|
107
|
+
### Navigation & Display
|
|
108
|
+
|
|
109
|
+
| Component | Description | Demo |
|
|
110
|
+
|-----------|-------------|------|
|
|
111
|
+
| AnimatedTooltip | Avatar row with mouse-following tooltips | [Demo](https://fancy-ui.rama.app/demo/animated-tooltip) |
|
|
112
|
+
| Compare | Before/after image comparison slider | [Demo](https://fancy-ui.rama.app/demo/compare) |
|
|
113
|
+
| Dock | macOS-style dock with icon magnification | [Demo](https://fancy-ui.rama.app/demo/dock) |
|
|
114
|
+
| LogoCloud | Marquee, grid, and icon logo layouts | [Demo](https://fancy-ui.rama.app/demo/logo-cloud) |
|
|
115
|
+
| Timeline | Vertical timeline with scroll-driven progress | [Demo](https://fancy-ui.rama.app/demo/timeline) |
|
|
116
|
+
|
|
117
|
+
## Quick Start
|
|
118
|
+
|
|
119
|
+
> **Status:** Pre-release. No npm package yet — components are available via copy-paste
|
|
120
|
+
> or by cloning the repo. A registry-based install (`npx shadcn-svelte@latest add`) is
|
|
121
|
+
> planned for v0.2.
|
|
122
|
+
|
|
123
|
+
**Browse and copy a component:**
|
|
124
|
+
1. Find the component you need in the [live demo](https://fancy-ui.rama.app)
|
|
125
|
+
2. Copy the source from `src/lib/fancy-ui/[component-name]/`
|
|
126
|
+
3. Paste into your project
|
|
127
|
+
|
|
128
|
+
**Or clone the full demo locally:**
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
git clone https://github.com/RamaHerbin/fancy-ui.git
|
|
132
|
+
cd fancy-ui
|
|
133
|
+
pnpm install
|
|
134
|
+
pnpm dev
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Development
|
|
138
|
+
|
|
139
|
+
```bash
|
|
140
|
+
pnpm dev # Start dev server
|
|
141
|
+
pnpm check # Run Svelte type checker
|
|
142
|
+
pnpm test # Run tests
|
|
143
|
+
pnpm test:watch # Run tests in watch mode
|
|
144
|
+
pnpm build # Production build
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Project Structure
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
src/
|
|
151
|
+
├── lib/
|
|
152
|
+
│ ├── fancy-ui/ # UI components (one folder per component)
|
|
153
|
+
│ │ ├── rainbow-button/
|
|
154
|
+
│ │ │ ├── RainbowButton.svelte
|
|
155
|
+
│ │ │ ├── RainbowButton.test.ts
|
|
156
|
+
│ │ │ ├── index.ts
|
|
157
|
+
│ │ │ └── README.md
|
|
158
|
+
│ │ ├── registry.ts # Component registry & metadata
|
|
159
|
+
│ │ └── index.ts # Barrel exports
|
|
160
|
+
│ └── components/ui/ # shadcn-svelte primitives
|
|
161
|
+
├── routes/
|
|
162
|
+
│ ├── +page.svelte # Home page
|
|
163
|
+
│ └── demo/ # Component demo pages
|
|
164
|
+
│ └── [component]/+page.svelte
|
|
165
|
+
└── tests/
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Contributing
|
|
169
|
+
|
|
170
|
+
Contributions are welcome! 52 components and counting — PRs for new components, bug fixes, and improvements are appreciated.
|
|
171
|
+
|
|
172
|
+
### Adding a new component
|
|
173
|
+
|
|
174
|
+
1. Create the component folder under `src/lib/fancy-ui/`
|
|
175
|
+
2. Implement the component in idiomatic Svelte 5
|
|
176
|
+
3. Add a demo page at `src/routes/demo/[slug]/+page.svelte`
|
|
177
|
+
4. Register it in `src/lib/fancy-ui/registry.ts`
|
|
178
|
+
5. Export it from `src/lib/fancy-ui/index.ts`
|
|
179
|
+
|
|
180
|
+
## Tech Stack
|
|
181
|
+
|
|
182
|
+
| Technology | Version | Purpose |
|
|
183
|
+
|------------|---------|---------|
|
|
184
|
+
| [Svelte](https://svelte.dev) | 5 | UI framework |
|
|
185
|
+
| [SvelteKit](https://svelte.dev/docs/kit) | 2 | App framework |
|
|
186
|
+
| [Tailwind CSS](https://tailwindcss.com) | 4 | Styling |
|
|
187
|
+
| [TypeScript](https://www.typescriptlang.org) | 5 | Type safety |
|
|
188
|
+
| [Vitest](https://vitest.dev) | 4 | Testing |
|
|
189
|
+
| [bits-ui](https://bits-ui.com) | 2 | Headless primitives |
|
|
190
|
+
| [GSAP](https://gsap.com) | 3 | Advanced animations |
|
|
191
|
+
|
|
192
|
+
## Credits
|
|
193
|
+
|
|
194
|
+
Inspired by [Inspira UI](https://inspira-ui.com), [Aceternity UI](https://ui.aceternity.com) and [Magic UI](https://magicui.design).
|
|
195
|
+
|
|
196
|
+
## License
|
|
197
|
+
|
|
198
|
+
MIT
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
TEMPLATE: Component.svelte
|
|
3
|
+
|
|
4
|
+
Instructions:
|
|
5
|
+
1. Copy this entire folder to src/lib/fancy-ui/[component-name]/
|
|
6
|
+
2. Rename this file to [ComponentName].svelte (PascalCase)
|
|
7
|
+
3. Replace all [ComponentName] placeholders with actual name
|
|
8
|
+
4. Replace all [component-name] placeholders with kebab-case name
|
|
9
|
+
5. Update props interface based on the reference design
|
|
10
|
+
6. Implement the component logic
|
|
11
|
+
7. Delete this comment block when done
|
|
12
|
+
-->
|
|
13
|
+
<script lang="ts" module>
|
|
14
|
+
import type { Snippet } from "svelte";
|
|
15
|
+
import type { HTMLAttributes } from "svelte/elements";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Props for [ComponentName]
|
|
19
|
+
*
|
|
20
|
+
* Update this interface based on the reference design's props.
|
|
21
|
+
* Use JSDoc comments for each prop to enable IDE documentation.
|
|
22
|
+
*/
|
|
23
|
+
export interface ComponentNameProps {
|
|
24
|
+
/** Additional CSS classes */
|
|
25
|
+
class?: string;
|
|
26
|
+
/** Component content */
|
|
27
|
+
children?: Snippet;
|
|
28
|
+
// TODO: Add component-specific props here
|
|
29
|
+
// Example:
|
|
30
|
+
// /** Animation duration in seconds */
|
|
31
|
+
// duration?: number;
|
|
32
|
+
}
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<script lang="ts">
|
|
36
|
+
import { cn } from "../../utils.js";
|
|
37
|
+
|
|
38
|
+
let {
|
|
39
|
+
class: className,
|
|
40
|
+
children,
|
|
41
|
+
// TODO: Destructure additional props with defaults
|
|
42
|
+
...restProps
|
|
43
|
+
}: ComponentNameProps = $props();
|
|
44
|
+
|
|
45
|
+
// ==========================================================================
|
|
46
|
+
// Reactive State
|
|
47
|
+
// Use $state() for mutable reactive values
|
|
48
|
+
// ==========================================================================
|
|
49
|
+
// let isActive = $state(false);
|
|
50
|
+
|
|
51
|
+
// ==========================================================================
|
|
52
|
+
// Derived Values
|
|
53
|
+
// Use $derived() for computed values that depend on props or state
|
|
54
|
+
// ==========================================================================
|
|
55
|
+
// const computedValue = $derived(someProp * 2);
|
|
56
|
+
|
|
57
|
+
// ==========================================================================
|
|
58
|
+
// Effects
|
|
59
|
+
// Use $effect() for side effects (DOM manipulation, subscriptions, etc.)
|
|
60
|
+
// ==========================================================================
|
|
61
|
+
// $effect(() => {
|
|
62
|
+
// // Runs when dependencies change
|
|
63
|
+
// return () => {
|
|
64
|
+
// // Cleanup function (optional)
|
|
65
|
+
// };
|
|
66
|
+
// });
|
|
67
|
+
|
|
68
|
+
// ==========================================================================
|
|
69
|
+
// Event Handlers
|
|
70
|
+
// Define handlers as functions, use onclick={handler} syntax in template
|
|
71
|
+
// ==========================================================================
|
|
72
|
+
// function handleClick(event: MouseEvent) {
|
|
73
|
+
// event.preventDefault();
|
|
74
|
+
// // Handle click
|
|
75
|
+
// }
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<!--
|
|
79
|
+
Template Structure:
|
|
80
|
+
- Use semantic HTML elements
|
|
81
|
+
- Apply cn() for class merging with className prop
|
|
82
|
+
- Use {@render children?.()} for slot content
|
|
83
|
+
- Use Svelte 5 event syntax: onclick={handler}
|
|
84
|
+
-->
|
|
85
|
+
<div
|
|
86
|
+
class={cn(
|
|
87
|
+
// Base styles
|
|
88
|
+
"relative",
|
|
89
|
+
// TODO: Add component styles using Tailwind classes
|
|
90
|
+
// Prefer theme tokens: bg-background, text-foreground, border-border, etc.
|
|
91
|
+
className
|
|
92
|
+
)}
|
|
93
|
+
{...restProps}
|
|
94
|
+
>
|
|
95
|
+
{@render children?.()}
|
|
96
|
+
</div>
|
|
97
|
+
|
|
98
|
+
<style>
|
|
99
|
+
/*
|
|
100
|
+
* Component-scoped styles
|
|
101
|
+
*
|
|
102
|
+
* Use this section for:
|
|
103
|
+
* - CSS animations (@keyframes)
|
|
104
|
+
* - CSS custom properties (--component-*)
|
|
105
|
+
* - Complex selectors that can't be done with Tailwind
|
|
106
|
+
*
|
|
107
|
+
* Prefer Tailwind classes in the template when possible.
|
|
108
|
+
* Use :global() sparingly for animation classes.
|
|
109
|
+
*/
|
|
110
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { Snippet } from "svelte";
|
|
2
|
+
/**
|
|
3
|
+
* Props for [ComponentName]
|
|
4
|
+
*
|
|
5
|
+
* Update this interface based on the reference design's props.
|
|
6
|
+
* Use JSDoc comments for each prop to enable IDE documentation.
|
|
7
|
+
*/
|
|
8
|
+
export interface ComponentNameProps {
|
|
9
|
+
/** Additional CSS classes */
|
|
10
|
+
class?: string;
|
|
11
|
+
/** Component content */
|
|
12
|
+
children?: Snippet;
|
|
13
|
+
}
|
|
14
|
+
declare const Component: import("svelte").Component<ComponentNameProps, {}, "">;
|
|
15
|
+
type Component = ReturnType<typeof Component>;
|
|
16
|
+
export default Component;
|
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
# Component Template
|
|
2
|
+
|
|
3
|
+
This template provides the starting point for implementing FancyUI components in Svelte.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# 1. Copy the template folder
|
|
9
|
+
cp -r src/lib/fancy-ui/_template src/lib/fancy-ui/[component-name]
|
|
10
|
+
|
|
11
|
+
# 2. Rename the component file
|
|
12
|
+
mv src/lib/fancy-ui/[component-name]/Component.svelte \
|
|
13
|
+
src/lib/fancy-ui/[component-name]/[ComponentName].svelte
|
|
14
|
+
|
|
15
|
+
# 3. Update index.ts imports and exports
|
|
16
|
+
|
|
17
|
+
# 4. Add to src/lib/fancy-ui/index.ts
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## File Structure
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
src/lib/fancy-ui/[component-name]/
|
|
24
|
+
├── [ComponentName].svelte # Main component
|
|
25
|
+
├── types.ts # Component-specific types (optional)
|
|
26
|
+
├── index.ts # Barrel exports
|
|
27
|
+
└── README.md # Implementation notes
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Implementation Workflow
|
|
31
|
+
|
|
32
|
+
### Step 1: Analyze the Reference Design
|
|
33
|
+
|
|
34
|
+
1. Open the reference design
|
|
35
|
+
2. Identify:
|
|
36
|
+
- **Props**: What configuration does it accept?
|
|
37
|
+
- **Slots**: What content areas does it have?
|
|
38
|
+
- **Events**: What events does it emit?
|
|
39
|
+
- **State**: What internal state does it manage?
|
|
40
|
+
- **Animations**: What CSS/JS animations does it use?
|
|
41
|
+
|
|
42
|
+
### Step 2: Create the Svelte Component
|
|
43
|
+
|
|
44
|
+
Use this mapping guide:
|
|
45
|
+
|
|
46
|
+
| Vue Pattern | Svelte 5 Equivalent |
|
|
47
|
+
|-------------|---------------------|
|
|
48
|
+
| `defineProps<T>()` | `let { ... }: T = $props()` |
|
|
49
|
+
| `ref(value)` | `let value = $state(initialValue)` |
|
|
50
|
+
| `computed(() => ...)` | `const value = $derived(...)` |
|
|
51
|
+
| `watch(dep, callback)` | `$effect(() => { ... })` |
|
|
52
|
+
| `<slot />` | `{@render children?.()}` |
|
|
53
|
+
| `<slot name="x" />` | `{@render slotName?.()}` |
|
|
54
|
+
| `emit('event', data)` | Pass callback prop or use CustomEvent |
|
|
55
|
+
| `:class="{ active }"` | `class:active` or `cn(..., { active })` |
|
|
56
|
+
| `v-if` | `{#if condition}` |
|
|
57
|
+
| `v-for` | `{#each items as item}` |
|
|
58
|
+
| `@click` | `onclick={handler}` |
|
|
59
|
+
| `@click.prevent` | `onclick={(e) => { e.preventDefault(); ... }}` |
|
|
60
|
+
|
|
61
|
+
### Step 3: Handle Styling
|
|
62
|
+
|
|
63
|
+
1. **Prefer Tailwind classes** in the template
|
|
64
|
+
2. **Use theme tokens** for colors:
|
|
65
|
+
- `bg-background`, `bg-card`, `bg-primary`
|
|
66
|
+
- `text-foreground`, `text-muted-foreground`
|
|
67
|
+
- `border-border`, `ring-ring`
|
|
68
|
+
3. **Use `cn()` utility** for class merging:
|
|
69
|
+
```svelte
|
|
70
|
+
<div class={cn('base-styles', className)} />
|
|
71
|
+
```
|
|
72
|
+
4. **Scoped styles** for animations:
|
|
73
|
+
```svelte
|
|
74
|
+
<style>
|
|
75
|
+
@keyframes custom {
|
|
76
|
+
from { opacity: 0; }
|
|
77
|
+
to { opacity: 1; }
|
|
78
|
+
}
|
|
79
|
+
</style>
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Step 4: Export the Component
|
|
83
|
+
|
|
84
|
+
1. Update `index.ts`:
|
|
85
|
+
```typescript
|
|
86
|
+
import ComponentName, { type ComponentNameProps } from './ComponentName.svelte';
|
|
87
|
+
export { ComponentName, type ComponentNameProps };
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
2. Add to `src/lib/fancy-ui/index.ts`:
|
|
91
|
+
```typescript
|
|
92
|
+
export * from './component-name';
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Step 5: Create Demo Page
|
|
96
|
+
|
|
97
|
+
Create `src/routes/demo/[component-name]/+page.svelte`:
|
|
98
|
+
|
|
99
|
+
```svelte
|
|
100
|
+
<script lang="ts">
|
|
101
|
+
import { ComponentName } from '$lib/fancy-ui/component-name';
|
|
102
|
+
</script>
|
|
103
|
+
|
|
104
|
+
<svelte:head>
|
|
105
|
+
<title>ComponentName - FancyUI</title>
|
|
106
|
+
</svelte:head>
|
|
107
|
+
|
|
108
|
+
<div class="container mx-auto max-w-4xl py-12 px-4">
|
|
109
|
+
<h1 class="text-3xl font-bold mb-2">ComponentName</h1>
|
|
110
|
+
<p class="text-muted-foreground mb-8">Description here.</p>
|
|
111
|
+
|
|
112
|
+
<section class="mb-12">
|
|
113
|
+
<h2 class="text-xl font-semibold mb-4">Basic Usage</h2>
|
|
114
|
+
<div class="rounded-lg border bg-card p-6">
|
|
115
|
+
<ComponentName />
|
|
116
|
+
</div>
|
|
117
|
+
</section>
|
|
118
|
+
</div>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Step 6: Update Demo Index
|
|
122
|
+
|
|
123
|
+
Add to the components array in `src/routes/demo/+page.svelte`:
|
|
124
|
+
|
|
125
|
+
```typescript
|
|
126
|
+
{
|
|
127
|
+
name: 'ComponentName',
|
|
128
|
+
href: '/demo/component-name',
|
|
129
|
+
description: 'Brief description',
|
|
130
|
+
status: 'done'
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Svelte 5 Patterns
|
|
135
|
+
|
|
136
|
+
### Props with Defaults
|
|
137
|
+
|
|
138
|
+
```svelte
|
|
139
|
+
<script lang="ts">
|
|
140
|
+
interface Props {
|
|
141
|
+
duration?: number;
|
|
142
|
+
class?: string;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
let {
|
|
146
|
+
duration = 1000,
|
|
147
|
+
class: className,
|
|
148
|
+
...restProps
|
|
149
|
+
}: Props = $props();
|
|
150
|
+
</script>
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Reactive State
|
|
154
|
+
|
|
155
|
+
```svelte
|
|
156
|
+
<script lang="ts">
|
|
157
|
+
let count = $state(0);
|
|
158
|
+
let items = $state<string[]>([]);
|
|
159
|
+
|
|
160
|
+
function increment() {
|
|
161
|
+
count++;
|
|
162
|
+
}
|
|
163
|
+
</script>
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Derived Values
|
|
167
|
+
|
|
168
|
+
```svelte
|
|
169
|
+
<script lang="ts">
|
|
170
|
+
let { width, height } = $props();
|
|
171
|
+
|
|
172
|
+
const area = $derived(width * height);
|
|
173
|
+
const isLarge = $derived(area > 1000);
|
|
174
|
+
</script>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Effects with Cleanup
|
|
178
|
+
|
|
179
|
+
```svelte
|
|
180
|
+
<script lang="ts">
|
|
181
|
+
let element: HTMLElement;
|
|
182
|
+
|
|
183
|
+
$effect(() => {
|
|
184
|
+
const observer = new ResizeObserver(handleResize);
|
|
185
|
+
observer.observe(element);
|
|
186
|
+
|
|
187
|
+
return () => observer.disconnect();
|
|
188
|
+
});
|
|
189
|
+
</script>
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
### Bindable Props
|
|
193
|
+
|
|
194
|
+
```svelte
|
|
195
|
+
<script lang="ts">
|
|
196
|
+
interface Props {
|
|
197
|
+
value?: number;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
let { value = $bindable(0) }: Props = $props();
|
|
201
|
+
</script>
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### Event Handlers
|
|
205
|
+
|
|
206
|
+
```svelte
|
|
207
|
+
<script lang="ts">
|
|
208
|
+
interface Props {
|
|
209
|
+
onclick?: (event: MouseEvent) => void;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
let { onclick }: Props = $props();
|
|
213
|
+
|
|
214
|
+
function handleClick(event: MouseEvent) {
|
|
215
|
+
// Internal logic
|
|
216
|
+
onclick?.(event);
|
|
217
|
+
}
|
|
218
|
+
</script>
|
|
219
|
+
|
|
220
|
+
<button onclick={handleClick}>Click me</button>
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
## Checklist
|
|
224
|
+
|
|
225
|
+
Before marking a component as done:
|
|
226
|
+
|
|
227
|
+
- [ ] All props from the reference design are supported
|
|
228
|
+
- [ ] Slots/children render correctly
|
|
229
|
+
- [ ] Events work as expected
|
|
230
|
+
- [ ] Animations are smooth
|
|
231
|
+
- [ ] Dark mode looks correct
|
|
232
|
+
- [ ] Disabled states work
|
|
233
|
+
- [ ] Keyboard navigation works (if applicable)
|
|
234
|
+
- [ ] `pnpm check` passes
|
|
235
|
+
- [ ] Demo page shows all variants
|
|
236
|
+
- [ ] README.md documents any Svelte-specific differences
|
|
237
|
+
|
|
238
|
+
## Common Issues
|
|
239
|
+
|
|
240
|
+
### TypeScript Errors with Event Handlers
|
|
241
|
+
|
|
242
|
+
Use explicit typing:
|
|
243
|
+
```svelte
|
|
244
|
+
<button onclick={(e: MouseEvent) => handleClick(e)}>
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
### Class Prop Conflicts
|
|
248
|
+
|
|
249
|
+
Always rename `class` to `className`:
|
|
250
|
+
```svelte
|
|
251
|
+
let { class: className }: Props = $props();
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
### Animation Not Working
|
|
255
|
+
|
|
256
|
+
Ensure keyframes are in `<style>` block and class is applied:
|
|
257
|
+
```svelte
|
|
258
|
+
<style>
|
|
259
|
+
@keyframes fade {
|
|
260
|
+
from { opacity: 0; }
|
|
261
|
+
to { opacity: 1; }
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.animate-fade {
|
|
265
|
+
animation: fade 0.3s ease-out;
|
|
266
|
+
}
|
|
267
|
+
</style>
|
|
268
|
+
```
|
|
269
|
+
|
|
270
|
+
### Reactive Value Not Updating
|
|
271
|
+
|
|
272
|
+
Use `$state()` for mutable values, not `let`:
|
|
273
|
+
```svelte
|
|
274
|
+
// Wrong
|
|
275
|
+
let count = 0;
|
|
276
|
+
|
|
277
|
+
// Correct
|
|
278
|
+
let count = $state(0);
|
|
279
|
+
```
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TEMPLATE: index.ts
|
|
3
|
+
*
|
|
4
|
+
* Barrel file for component exports.
|
|
5
|
+
*
|
|
6
|
+
* Instructions:
|
|
7
|
+
* 1. Rename ComponentName to your actual component name
|
|
8
|
+
* 2. Update the import path to match your .svelte file
|
|
9
|
+
* 3. Export any additional types from types.ts that consumers need
|
|
10
|
+
* 4. Delete this comment block when done
|
|
11
|
+
*/
|
|
12
|
+
import ComponentName, { type ComponentNameProps } from "./Component.svelte";
|
|
13
|
+
export { ComponentName, type ComponentNameProps };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TEMPLATE: index.ts
|
|
3
|
+
*
|
|
4
|
+
* Barrel file for component exports.
|
|
5
|
+
*
|
|
6
|
+
* Instructions:
|
|
7
|
+
* 1. Rename ComponentName to your actual component name
|
|
8
|
+
* 2. Update the import path to match your .svelte file
|
|
9
|
+
* 3. Export any additional types from types.ts that consumers need
|
|
10
|
+
* 4. Delete this comment block when done
|
|
11
|
+
*/
|
|
12
|
+
// =============================================================================
|
|
13
|
+
// Main Component Export
|
|
14
|
+
// =============================================================================
|
|
15
|
+
import ComponentName, {} from "./Component.svelte";
|
|
16
|
+
export { ComponentName };
|
|
17
|
+
// =============================================================================
|
|
18
|
+
// Type Exports (optional)
|
|
19
|
+
// Only export types that consumers of the component might need
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// export type { ComponentConfig, ComponentItem } from './types.js';
|
|
22
|
+
// =============================================================================
|
|
23
|
+
// Subcomponent Exports (if applicable)
|
|
24
|
+
// Some components have multiple parts (e.g., Tabs, TabsList, TabsTrigger)
|
|
25
|
+
// =============================================================================
|
|
26
|
+
// export { ComponentNameItem } from './ComponentNameItem.svelte';
|
|
27
|
+
// export { ComponentNameTrigger } from './ComponentNameTrigger.svelte';
|