Decorated Text
scrollxui/decorated-textFreeComponent
decorative text frame with corner accents and a compact entrance effect.
Live preview
live · rendered by the registry
Rendered by scrollxui on their own page — this is the component running, not a screenshot of it.Install it
npx shadcn@latest add https://scrollxui.dev/registry/decorated-text.jsonSource
1import React from 'react';2import { motion } from 'motion/react';3import { cn } from '@/lib/utils';45interface DecoratedTextProps {6 text?: string;7 children?: React.ReactNode;8 className?: string;9 bordered?: boolean;10 showIcons?: boolean;11 iconClassName?: string;12 glowEffect?: boolean;13 flicker?: boolean;14}1516function DecoratedText({17 text,18 children,19 className,20 bordered = true,21 showIcons = true,22 iconClassName,23 glowEffect = true,24 flicker = true,25}: DecoratedTextProps) {26 const content = text || children;2728 return (29 <motion.span30 className={cn(31 'group/decorated relative inline-block',32 bordered && 'border border-black/20 dark:border-white/20',33 className,34 )}35 >36 {flicker && (37 <motion.span38 initial={{ opacity: 0 }}39 animate={{ opacity: [0, 1, 0.4, 1, 0] }}40 transition={{41 duration: 0.45,42 times: [0, 0.25, 0.5, 0.75, 1],43 ease: 'easeOut',44 }}45 className='absolute inset-0 bg-black/10 dark:bg-white/10 pointer-events-none'46 />47 )}4849 <motion.span50 initial={flicker ? { opacity: 0 } : false}51 animate={flicker ? { opacity: [0, 1, 0.3, 1] } : { opacity: 1 }}52 transition={53 flicker54 ? { duration: 1.5, ease: 'easeInOut', times: [0, 0.4, 0.65, 1] }55 : undefined56 }57 className='relative z-10 inline-block leading-none'58 >59 {content}60 </motion.span>6162 {showIcons && (63 <>64 <Icon65 className={cn(66 'absolute top-0 left-0 -translate-x-1/2 -translate-y-1/2 h-3 w-3 text-black dark:text-white',67 iconClassName,68 )}69 />70 <Icon71 className={cn(72 'absolute bottom-0 left-0 -translate-x-1/2 translate-y-1/2 h-3 w-3 text-black dark:text-white',73 iconClassName,74 )}75 />76 <Icon77 className={cn(78 'absolute top-0 right-0 translate-x-1/2 -translate-y-1/2 h-3 w-3 text-black dark:text-white',79 iconClassName,80 )}81 />82 <Icon83 className={cn(84 'absolute bottom-0 right-0 translate-x-1/2 translate-y-1/2 h-3 w-3 text-black dark:text-white',85 iconClassName,86 )}87 />88 </>89 )}9091 {glowEffect && (92 <motion.span93// … truncated
What it pulls in
npm packages
Other registry items
Files it writes
More from scrollxui
All 180 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| Accordionaccordion | scrollxui | Components | Free | 4 deps | |
| Alert Dialogalert-dialog | scrollxui | Components | Free | 7 deps | |
| Animated Buttonanimated-button | scrollxui | Components | Free | 4 deps | |
| Animated Tabsanimated-tabs | scrollxui | Components | Free | 1 dep | |
| Animated Testimonialsanimated-testimonials | scrollxui | Components | Free | 2 deps | |
| Animated TextGenerateanimated-textgenerate | scrollxui | Components | Free | 3 deps | |
| Announcementannouncement | scrollxui | Components | Free | 5 deps | |
| Aspect Ratioaspect-ratio | scrollxui | Components | Free | 1 dep |
