family-button-demo
cult-ui/family-button-demoFreeComponent
cult/ui publishes no description for this item.
Install it
npx shadcn@latest add https://raw.githubusercontent.com/nolly-studio/cult-ui/HEAD/apps/www/public/r/styles/default/family-button-demo.jsonSource
1"use client"23import { useMemo, useState } from "react"4import { AnimatePresence, motion, MotionConfig } from "motion/react"5import useMeasure from "react-use-measure"67import FamilyButton from "../ui/family-button"89export default function FamilyButtonDemo() {10 return (11 <div className=" w-full h-full min-h-[240px]">12 <div className="absolute bottom-4 right-4 ">13 <FamilyButton>14 <MusicPlayerExample />15 </FamilyButton>16 </div>17 </div>18 )19}2021let tabs = [22 { id: 0, label: "Apple" },23 { id: 1, label: "Spotify" },24]2526export function MusicPlayerExample() {27 const [activeTab, setActiveTab] = useState(0)28 const [direction, setDirection] = useState(0)29 const [isAnimating, setIsAnimating] = useState(false)30 const [ref, bounds] = useMeasure()3132 const content = useMemo(() => {33 switch (activeTab) {34 case 0:35 return (36 <div className="flex items-center justify-center">37 <svg38 xmlns="http://www.w3.org/2000/svg"39 xmlSpace="preserve"40 viewBox="0 0 361 361"41 width="5em"42 height="5em"43 >44 <linearGradient45 id="a"46 x1={180}47 x2={180}48 y1={358.605}49 y2={7.759}50 gradientUnits="userSpaceOnUse"51 >52 <stop53 offset={0}54 style={{55 stopColor: "#fa233b",56 }}57 />58 <stop59 offset={1}60 style={{61 stopColor: "#fb5c74",62 }}63 />64 </linearGradient>65 <path66// … truncated
What it pulls in
Other registry items
Files it writes
More from cult/ui
All 157 items| Component | Registry | Kind | Access | Installs | Command |
|---|---|---|---|---|---|
| ai-instructionsai-instructions | cult/ui | Components | Free | 2 deps | |
| ai-instructions-demoai-instructions-demo | cult/ui | Components | Free | no deps | |
| animated-numberanimated-number | cult/ui | Components | Free | 1 dep | |
| animated-number-demoanimated-number-demo | cult/ui | Components | Free | no deps | |
| bg-animate-buttonbg-animate-button | cult/ui | Components | Free | no deps | |
| bg-animate-button-demobg-animate-button-demo | cult/ui | Components | Free | no deps | |
| bg-animated-fractal-dot-gridbg-animated-fractal-dot-grid | cult/ui | Components | Free | 1 dep | |
| bg-animated-fractal-dot-grid-demobg-animated-fractal-dot-grid-demo | cult/ui | Components | Free | no deps |
