# Floret > Crafted, motion-rich React components that install with the shadcn CLI: a free, open-source core, and Floret Pro for premium pieces. Components are React 19 + Tailwind CSS v4 + motion, distributed as a shadcn registry. Installing copies the source into components/ui and adds theme tokens (surface, surface-raised, border-strong, brand, positive, negative, warning) on top of the standard shadcn tokens. ## Star Button A star toggle whose star arcs into the counter, which ticks up with a floating +1. - Category: Buttons - Access: Free, MIT - Docs: https://floret.shippedui.com/components/star-button - Install: `npx shadcn@latest add https://floret.shippedui.com/r/star-button.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | defaultCount | `number` | `0` | Count shown before any interaction. | | defaultStarred | `boolean` | `false` | Start starred. The count is expected to already include the viewer's star. | | onStarredChange | `(starred: boolean, count: number) => void` | — | Called once the animation settles. Persist the star here. | | label | `string` | `"Star"` | Idle label. | | starredLabel | `string` | `"Starred"` | Label while starred. | | className | `string` | — | Merged onto the button; size it with h-* and w-*. | ### Usage ```tsx import { StarButton } from "@/components/ui/star-button"; export function RepoActions({ stars, starred }: { stars: number; starred: boolean }) { return ( toggleStar(next)} /> ); } ``` ## Subscribe Button A subscribe pill that widens, flashes, rings its bell and throws sparkles — then opens a notification menu. - Category: Buttons - Access: Free, MIT - Docs: https://floret.shippedui.com/components/subscribe-button - Install: `npx shadcn@latest add https://floret.shippedui.com/r/subscribe-button.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | onSubscribe | `() => void` | — | Fires on the first press. | | onUnsubscribe | `() => void` | — | Fires when Unsubscribe is picked from the menu. | | onPreferenceChange | `(level: "all" \| "personalised" \| "none") => void` | — | Fires when a notification level is picked. | | defaultPreference | `SubscribePreference` | `"personalised"` | Level selected right after subscribing, and again after unsubscribing. | | colors | `readonly string[]` | `["#ff0033", …, "#f0287a"]` | Sparkle colors. The first and fourth also form the press flash gradient. | | label | `string` | `"Subscribe"` | Idle label. | | subscribedLabel | `string` | `"Subscribed"` | Label once subscribed. | ### Usage ```tsx import { SubscribeButton } from "@/components/ui/subscribe-button"; api.subscribe(channelId)} onUnsubscribe={() => api.unsubscribe(channelId)} onPreferenceChange={(level) => api.setNotifications(channelId, level)} /> ``` ### Types ```ts export type SubscribePreference = "all" | "personalised" | "none"; ``` ## Magnetic Button A button that leans toward the pointer as it approaches and springs back when it leaves, its label floating above the surface. - Category: Buttons - Access: Floret Pro (license required) - Docs: https://floret.shippedui.com/components/magnetic-button - Install: `npx @shipped-ui/floret add magnetic-button` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | strength | `number` | `14` | How far, in px, the button may travel toward the pointer. | | radius | `number` | `48` | Extra reach around the button, in px, where the pull starts. | | className | `string` | — | Merged onto the button. | ### Usage ```tsx import { MagneticButton } from "@/components/ui/magnetic-button"; export function Hero() { return start()}>Get started; } ``` ## Card Stack A looping vertical deck: pills slide in, the middle card blooms open, then folds away below. - Category: Cards & Carousels - Access: Free, MIT - Docs: https://floret.shippedui.com/components/card-stack - Install: `npx shadcn@latest add https://floret.shippedui.com/r/card-stack.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | items (required) | `readonly T[]` | — | Cards to cycle through; the deck wraps around. | | renderHeader (required) | `(item: T, index: number) => ReactNode` | — | The strip shown on every card. It is the entire card while collapsed. | | renderBody (required) | `(item: T, index: number) => ReactNode` | — | Content revealed under the header while the card is expanded. | | interval | `number` | `5200` | Milliseconds each card stays expanded. | | duration | `number` | `1.2` | Seconds per handoff. | | collapsedHeight | `number` | `48` | Pill height in px. | | expandedHeight | `number` | `224` | Expanded card height in px. | | collapsedScale | `number` | `0.84` | Scale applied to collapsed pills. | | gap | `number` | `12` | Space between slots in px. | | paused | `boolean` | `false` | Stops the cycle. | | cardClassName | `string` | — | Classes for each card shell. | | className | `string` | — | Fills its container's width; cap it here, e.g. max-w-sm. | ### Usage ```tsx import { CardStack } from "@/components/ui/card-stack"; (
{report.owner} {report.title}
)} renderBody={(report) => } /> ``` ## Accordion Carousel An accordion of sections beside a media carousel; opening a section blurs the carousel over to its slides. - Category: Cards & Carousels - Access: Free, MIT - Docs: https://floret.shippedui.com/components/accordion-carousel - Install: `npx shadcn@latest add https://floret.shippedui.com/r/accordion-carousel.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | sections (required) | `AccordionCarouselSection[]` | — | Accordion rows, each with its own slides. | | defaultSectionId | `string` | — | Section open on mount; defaults to the first. | | onSectionChange | `(id: string) => void` | — | Called when another section is opened. | | className | `string` | — | Merged onto the outer layout. | ### Usage ```tsx import { AccordionCarousel } from "@/components/ui/accordion-carousel"; ``` ### Types ```ts export type AccordionCarouselSection = { id: string; title: string; description: string; slides: CarouselSlide[]; }; export type CarouselSlide = { id: string; heading?: string; summary?: string; media: | { type: "image"; src: string; alt: string } | { type: "video"; src: string; poster?: string; alt?: string; autoPlay?: boolean; loop?: boolean; muted?: boolean; controls?: boolean }; }; ``` ## Rolling Reader A scroll-driven reader where text stays flat and curls away over a drum at the edges, under a progressive blur. - Category: Text & Reading - Access: Free, MIT - Docs: https://floret.shippedui.com/components/rolling-reader - Install: `npx shadcn@latest add https://floret.shippedui.com/r/rolling-reader.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | paragraphs (required) | `string[]` | — | Plain-text paragraphs. Each one is a snap point. | | label | `string` | `"Reader"` | Accessible name of the scroll region. | | height | `number` | `420` | Card height in px. | | className | `string` | — | Fills its container's width; cap it here, e.g. max-w-md. | ### Usage ```tsx import { RollingReader } from "@/components/ui/rolling-reader"; ``` ## Now Playing A word that dances, turns green and puffs music notes while a track plays — hover it for a card with a spinning record. - Category: Text & Reading - Access: Free, MIT - Docs: https://floret.shippedui.com/components/now-playing - Install: `npx shadcn@latest add https://floret.shippedui.com/r/now-playing.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | track | `NowPlayingTrack \| null` | — | The current or most recent track. While it's missing, the word shows without a card. | | children | `ReactNode \| ({ isPlaying }) => ReactNode` | `the dancing word “music.”` | What sits in the sentence. Pass a function to react to playback. | | open | `boolean` | — | Keeps the card open. By default it opens on hover and keyboard focus. | | className | `string` | — | Merged onto the wrapper; it is 3rem wide by default. | ### Usage ```tsx import { NowPlaying } from "@/components/ui/now-playing/now-playing"; // Feed it from your own endpoint (e.g. Spotify's currently-playing API), // polled every few seconds. const track = { title: "Midnight Drive", artist: "Neon Harbor", albumImage: "https://…/cover.jpg", songUrl: "https://open.spotify.com/track/…", isPlaying: true, playedAt: null, };

Beyond work, I like to listen to

``` ### Types ```ts export type NowPlayingTrack = { title: string; artist: string; albumImage: string; songUrl?: string; // leave out for a plain-text title isPlaying: boolean; playedAt?: string | null; // ISO time, for "Last played 5 minutes ago" }; // Also exported from ./dancing-text: ``` ## GitHub Contributions A GitHub-style contribution calendar in greys where your busiest days bloom into blue, with a hover readout for each day. - Category: Data Display - Access: Floret Pro (license required) - Docs: https://floret.shippedui.com/components/github-contributions - Install: `npx @shipped-ui/floret add github-contributions` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | days | `ContributionDay[]` | — | One entry per day, oldest first, starting on a Sunday — the order GitHub's calendar API returns. | | loading | `boolean` | `false` | Shows a pulsing skeleton grid while you fetch. | | className | `string` | — | The graph fills its container's width. | ### Usage ```tsx import { GitHubContributions } from "@/components/ui/github-contributions"; // Fetch on the server so your token never reaches the browser. async function getContributions(login: string) { const res = await fetch("https://api.github.com/graphql", { method: "POST", headers: { Authorization: `Bearer ${process.env.GITHUB_TOKEN}` }, body: JSON.stringify({ query: `query($login: String!) { user(login: $login) { contributionsCollection { contributionCalendar { weeks { contributionDays { date contributionCount } } } } } }`, variables: { login }, }), next: { revalidate: 3600 }, }); const { data } = await res.json(); return data.user.contributionsCollection.contributionCalendar.weeks .flatMap((w: any) => w.contributionDays) .map((d: any) => ({ date: d.date, count: d.contributionCount })); } export default async function Profile() { return ; } ``` ### Types ```ts export type ContributionDay = { date: string; // "2026-11-23" count: number; level?: number; // 0–4; worked out from count when left out }; // Also exported: the GitHub-style bucketing used when level is left out. export function contributionLevel(count: number): number; ``` ## Logo Cloud A row of customer logos where one cell at a time blurs out and returns as a logo not yet on screen. - Category: Marketing - Access: Free, MIT - Docs: https://floret.shippedui.com/components/logo-cloud - Install: `npx shadcn@latest add https://floret.shippedui.com/r/logo-cloud.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | logos (required) | `LogoCloudLogo[]` | — | Logo URLs or inline SVG nodes. Rotation needs more logos than cells. | | title | `ReactNode` | `"Trusted by teams at"` | Line above the row; pass null to hide. | | cells | `number` | `4` | Visible cells. | | interval | `number` | `4000` | Milliseconds between swaps. | | fade | `number` | `500` | Blur-out duration in ms. | | invertInDark | `boolean` | `true` | Inverts image logos in dark mode so black marks stay visible. Inline SVGs use currentColor instead. | ### Usage ```tsx import { LogoCloud } from "@/components/ui/logo-cloud"; const logos = [ { name: "Acme", logo: "/logos/acme.svg" }, { name: "Globex", logo: }, // …more logos than cells, so they rotate ]; ``` ### Types ```ts export type LogoCloudLogo = { name: string; logo: string | React.ReactNode; }; // Exported too, for building your own layout: export function useLogoCloud(options: { logoCount: number; cells: number; interval: number; fade: number; enabled: boolean; }): { shown: number[]; fading: number | null }; ``` ## Halloween Banner A glowing seasonal banner with spiders bobbing on threads, jittering jack-o'-lanterns and embers that burst on the floor. - Category: Marketing - Access: Floret Pro (license required) - Docs: https://floret.shippedui.com/components/halloween-banner - Install: `npx @shipped-ui/floret add halloween-banner` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | title | `string` | `"HAPPY HALLOWEEN"` | Headline; also the banner's accessible name. | | color | `string` | `"#ffaa00"` | Glow color for the title, embers and candle light. | | pumpkinColor | `string` | `"#d97706"` | Pumpkin body color. | | fontFamily | `string` | `"var(--font-spooky, ui-serif), …"` | Title font stack. Set --font-spooky globally to theme every banner at once. | | embers | `boolean` | `true` | Falling embers that burst into sparks. | | className | `string` | — | Set the background here — the banner is transparent. | ### Usage ```tsx import { HalloweenBanner } from "@/components/ui/halloween-banner"; // Optional: load a display face and expose it as --font-spooky. // import localFont from "next/font/local"; // const spooky = localFont({ src: "./fonts/HALLOWEEN.ttf", variable: "--font-spooky" }); ``` ## Globe Clock A 24-hour clock of three rotating dials around a spinning dotted globe; rings ripple out and sweep to the time on load. - Category: Visuals - Access: Floret Pro (license required) - Docs: https://floret.shippedui.com/components/globe-clock - Install: `npx @shipped-ui/floret add globe-clock` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | markAngle | `number` | `0` | Position of the reading mark in degrees clockwise from 12 o'clock. | | threshold | `number` | `0.5` | Degrees either side of the mark that still light up. | | globe | `boolean` | `true` | Render the cobe globe in the center. | | markers | `GlobeMarker[]` | `six world cities` | Cities on the globe. Labels follow them with CSS anchor positioning. | | className | `string` | — | Size the clock here; it fills its box and stays square. | ### Usage ```tsx import { GlobeClock } from "@/components/ui/globe-clock/globe-clock";
``` ### Types ```ts export type GlobeMarker = { id: string; // becomes the CSS anchor --cobe-{id} label: string; location: [lat: number, lng: number]; }; ``` ## Galaxy A WebGPU night sky of ~130k twinkling stars with Milky Way bands, a cursor-wake glow, ordered dithering and bloom. - Category: Visuals - Access: Free, MIT - Docs: https://floret.shippedui.com/components/galaxy - Install: `npx shadcn@latest add https://floret.shippedui.com/r/galaxy.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | density | `number` | `1` | Star count multiplier (1 ≈ 130k). Use ~0.4 for small canvases or low-end devices. | | background | `string` | `"#1f1f1f"` | Sky color behind the stars. | | interactive | `boolean` | `true` | Stars brighten along the cursor's path. | | dither | `number` | `1` | Ordered Bayer dither amount, 0–1. | | bloom | `number` | `0.2` | Bloom strength; fades in after the first frames. | | className | `string` | — | The canvas fills its nearest positioned ancestor. | ### Usage ```tsx import { Galaxy } from "@/components/ui/galaxy";

Ship among the stars

``` ## On This Page A table of contents whose dot rides a thin rail with the scroll, bending in to fold open each section's subsections as you reach them. - Category: Navigation - Access: Free, MIT - Docs: https://floret.shippedui.com/components/on-this-page - Install: `npx shadcn@latest add https://floret.shippedui.com/r/on-this-page.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | sections (required) | `Section[]` | — | The page's sections in order, each with an optional list of subsections. | | container | `RefObject` | — | The element that scrolls, when it isn't the window. Section ids are looked up inside it. | | label | `string` | `"On this page"` | Heading above the list; also the nav's accessible name. | | offset | `number` | `96` | Distance in px from the top of the scroller where a section counts as current. Match your sticky header. | | maxSubsections | `number` | `5` | Most subsections shown at once; the rest slide in as you go, with More above / More below rows. 0 shows all. | | inset | `number` | `18` | How far in, in px, the subsection line sits from the main line. | | curve | `number` | `0.5` | Softness of the bend between the two lines. 0.5 is a classic S; lower is tighter. | | rowHeight | `number` | `30` | Height of one row, px. | | sectionGap | `number` | `4` | Extra space above each new section, px. | | subsectionGap | `number` | `0` | Space between subsections, px. Negative values pull them closer. | | bendRoom | `number` | `8` | Extra space above a group's first subsection, giving the bend more room, px. | | lineWidth | `number` | `2` | Width of the rail, px. | | dotSize | `number` | `8` | Diameter of the dot, px. | | className | `string` | — | Classes for the nav. | ### Usage ```tsx import { OnThisPage } from "@/components/ui/on-this-page"; // Each id must match an element on the page, like

. const sections = [ { id: "intro", title: "Introduction" }, { id: "install", title: "Installation", children: [ { id: "install-cli", title: "With the CLI" }, { id: "install-manual", title: "By hand" }, ], }, { id: "usage", title: "Usage" }, ]; export function DocsSidebar() { return ( ); } ``` ### Types ```ts type SubSection = { id: string; title: string }; // A section, optionally with one level of subsections. type Section = SubSection & { children?: readonly SubSection[] }; ``` ## Table of Contents A table of contents that lights up every heading in view: a stepped rail glows beside them and each dot pulses as its section arrives. On phones it folds into a progress ring. - Category: Navigation - Access: Free, MIT - Docs: https://floret.shippedui.com/components/table-of-contents - Install: `npx shadcn@latest add https://floret.shippedui.com/r/table-of-contents.json` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | selector | `string` | `"h2, h3"` | Which headings to collect. Headings without an id get one from their text. | | headings | `TocHeading[]` | — | List the headings yourself instead, for server-rendered pages that already know them. | | container | `RefObject` | — | The element that scrolls, when it isn't the window. Headings are looked up inside it. | | offset | `number` | `96` | Distance in px from the top of the scroller where a heading counts as current. Match your sticky header. | | collapse | `"auto" \| "always" \| "never"` | `"auto"` | auto folds into a progress button below 768px; always and never force one or the other. | | label | `string` | `"On this page"` | Heading above the list; also the nav's accessible name. | | emptyLabel | `string` | `"No headings"` | Shown when there are no headings to list. | | className | `string` | — | Classes for the nav, or the compact wrapper. | ### Usage ```tsx import { TableOfContents } from "@/components/ui/table-of-contents"; // Reads every h2 and h3 inside
, adding ids where they're missing. export function DocsLayout({ children }: { children: React.ReactNode }) { return (
{children}
); } ``` ### Types ```ts export type TocHeading = { id: string; title: string; level: number; // 2 for an h2, 3 for an h3, … }; ``` ## Testimonials A testimonial deck that rolls each quote in like a drum, beside a contact call to action whose jigsaw pieces snap together as you reach for it. - Type: Block - Access: Floret Pro (license required) - Docs: https://floret.shippedui.com/blocks/testimonials - Install: `npx @shipped-ui/floret add testimonials` ### Props | Prop | Type | Default | Description | | --- | --- | --- | --- | | testimonials (required) | `Testimonial[]` | — | The quotes. Three or more keeps a card above and below the open one. | | links (required) | `ContactLink[]` | — | Contact links under the call to action. The first one starts open. | | heading | `string` | — | Optional line above the section. | | ctaTitle | `string` | `"Pieces are connecting. Your move?"` | Call to action set inside the jigsaw. | | autoplayMs | `number` | `4800` | Time each quote stays open. 0 turns autoplay off; it also pauses off-screen and after a manual move. | | className | `string` | — | Classes for the section. | ### Usage ```tsx import { CalendarDays, Mail } from "lucide-react"; import { Testimonials } from "@/components/blocks/testimonials/testimonials"; export function Words() { return ( }, { label: "you@example.com", href: "mailto:you@example.com", icon: , hideIconWhenActive: true, copy: "you@example.com", }, ]} /> ); } ``` ### Types ```ts type Testimonial = { id: string; name: string; role: string; company: string; image?: string; // initials are shown when missing companyLogo?: { src: string; monochrome?: boolean; aspectRatio?: number }; quote: string; }; type ContactLink = { label: string; href: string; icon: React.ReactNode; hideIconWhenActive?: boolean; // let a long label (an email) take the icon's place copy?: string; // adds a copy button for this text }; ```