Skip to Content
Kokonut UI

IN-17InputsNew, November 28, 2026

Platform Picker

The add-an-account panel. Pick a platform from the grid, read what connecting it takes, and come back to the grid with the new account counted.

Install with
lucide-react, motion

IN USEThis component is used in Postrippl.

Usage

Each platform has an id, a name, how many accounts are connected, and an optional hint for the connect step. x, bluesky, linkedin, threads, discord and pinterest get their marks. Pass icon for any other platform. limit is how many accounts the plan allows, and it drives the meter at the bottom. onConnect runs when the user continues. Resolve it once the account is in, and the picker goes back to the grid with the count up by one. Throw from it and the step stays open, so they can try again.

"use client";

import PlatformPicker from "@/components/kokonutui/platform-picker";

export function AddAccount({ counts }: { counts: Record<string, number> }) {
  return (
    <PlatformPicker
      limit={10}
      onConnect={(platform) => signInWith(platform.id)}
      platforms={[
        { id: "x", name: "X", connected: counts.x },
        {
          id: "bluesky",
          name: "Bluesky",
          connected: counts.bluesky,
          hint: "Connect with your handle and an app password.",
        },
        { id: "linkedin", name: "LinkedIn", connected: counts.linkedin },
      ]}
    />
  );
}

PRONatural Date Input and more like it are in Kokonut UI Pro

Installation

Platform Picker is a free, open-source React component in the Kokonut UI Inputs collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/platform-picker.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/platform-picker

Or add it by hand: install its packages, then copy the source from Copy code above into components/kokonutui/platform-picker.tsx.

npm install lucide-react motion

Props

title
stringDefault "Add an account"
description
stringDefault "Pick a platform. You can connect several accou…
platforms
Platform[]
limit
numberDefault 5

Accounts the plan allows. Shows a meter under the grid.

onConnect
(platform: Platform) => Promise<void> | void

Connects an account on the picked platform. Resolve when it's done; the picker goes back to the grid and counts it. Leave out for the demo.

className
string

Extra classes for the root element.

Platform

idrequired
string
namerequired
string
icon
ReactNode

A mark for the tile. Known ids get one; others get their initial.

connected
number

Accounts already connected on it.

hint
string

One line on what connecting needs, shown on the second step.

Dependencies

NeedsVersionComes from
lucide-react^0.556.0npm, installed by the CLI
motion^12.23.25npm, installed by the CLI
cn from lib/utils.tsshadcn init
React19Your app
Tailwind CSS4Your app

No provider, font or global CSS to set up: the file works as soon as it lands.