35 | Using Dark Mode for the components. 36 |
37 |Toggle theme
34 |{description}
43 |57 | {prop.description} 58 |
59 |
37 | {code}
38 |
39 |
40 |
70 | {title}
59 |78 | Latest updates and improvements to KL UI. 79 |
80 |{description}
54 | )} 55 |Welcome to the dark mode ...
18 | ) : ( 19 |Click to enter the mystery ...
20 | )} 21 |34 | I just realized that many of you are using dark mode in your site. 35 | Sorry that it came late, but late is better than never - I've 36 | added dark mode support to all components. 37 |
38 |39 | And ngl, dark mode is actually pretty sick lol 🔥 40 |
41 | 42 |48 | The installation is also not that hard, you can follow how shadcn 49 | ui did: 50 |
51 |44 | Install Shadcn UI CLI to add components 45 |
46 |70 | Install Motion for animations 71 |
72 |110 | Learn how to use the components in your project 111 |
112 |138 |143 |139 | It works especially well in sidebars, but you can use it 140 | anywhere too! 141 |
142 |
52 | Animated UI components and effects with love. Build with{" "} 53 | shadcn/ui and{" "} 54 | Motion. 55 |
56 |76 | So here's the thing - I randomly posted some of my UI work on X 77 | one day and went off to grab dinner. When I came back, my phone was 78 | going crazy with notifications 79 |
80 |81 | And get this - shadcn himself 82 | had commented on my tweet lol. 83 |
84 | 85 |86 | That moment got me thinking - "Hey, why not share these UI 87 | components with everyone?" I mean, I'm still learning and 88 | growing in design, but I feel like that's the motivation for me 89 | to do that. 90 |
91 | 92 |
93 | Btw I've got to mention my buddy{" "}
94 |
105 | Last thing - This is my first repo on GitHub, your support means a lot 106 | to me.{" "} 107 | 108 | I am Karrix - please enjoy the UI components! 109 | 110 |
111 |131 | All complex animations are powered by Motion, while simpler UI 132 | interactions use shadcn's built-in transitions. I've 133 | extensively tested each component to ensure optimal performance 134 | and ease of use. 135 |
136 |137 | If you encounter any performance issues, please don't 138 | hesitate to report them - I'm committed to providing the 139 | best possible experience. 140 |
141 |147 | Simple — because I made this with love and interest. I'm 148 | not just throwing in random components for the sake of it. 149 | Everything here is something I genuinely think is the best 150 | I've ever made. 151 |
152 |153 | I'll add more when I feel it's right — when I create 154 | something that truly deserves a spot here. Until then, enjoy 155 | what's here, knowing each piece is built with real care. 156 |
157 |
168 | Special thanks to{" "}
169 |
179 | Also, a huge shoutout to{" "}
180 |
},
36 | ];
37 |
38 | const handleReload = () => {
39 | setKey((prev) => prev + 1);
40 | };
41 |
42 | const handleCopy = async () => {
43 | try {
44 | if (copied) return;
45 |
46 | await navigator.clipboard.writeText(unsavePopupCode);
47 | setCopied(true);
48 | setTimeout(() => {
49 | setCopied(false);
50 | }, 2000); // Reset after 2 seconds
51 | } catch (err) {
52 | console.error("Failed to copy:", err);
53 | }
54 | };
55 |
56 | useEffect(() => {
57 | const observer = new IntersectionObserver(
58 | (entries) => {
59 | entries.forEach((entry) => {
60 | if (entry.target.id === "playground") {
61 | setIsInPlayground(entry.isIntersecting);
62 | }
63 | });
64 | },
65 | { threshold: 0.2 }
66 | );
67 |
68 | const playground = document.getElementById("playground");
69 | if (playground) {
70 | observer.observe(playground);
71 | }
72 |
73 | return () => observer.disconnect();
74 | }, []);
75 |
76 | return (
77 | Reset demo
158 |{copied ? "Copied!" : "Copy code"}
187 |193 |218 |194 | When using compound components: 195 |
196 |197 |
213 |- 198 |
202 |199 | UnsavePopupDescription 200 |201 |- 203 |
207 |204 | UnsavePopupAction 205 |206 |- 208 |
212 |209 | UnsavePopupDismiss 210 |211 |214 | You must include all three components together. Using them 215 | individually will throw an error. 216 |
217 |