Skip to Content
Kokonut UI

AI-28AINew, November 28, 2026

AI Post

A post the assistant sent to several accounts at once. Each row counts the characters against that network's limit and shows when it went out, or when it will.

Install with
lucide-react, motion

IN USEThis component is used in Postrippl.

Usage

With no props it plays the demo: X and Bluesky go live, LinkedIn waits for its time, and Post now sends it early. Pass targets and the card follows your scheduler instead, one row per account. A row's status is scheduled, posting, posted or failed; when is the time to show, url adds a View link once it's live, and error explains a failure. Edit and Post now only show while a row is still scheduled, and only when you pass onEdit or onPostNow.

"use client";

import AIPost, { type PostTarget } from "@/components/kokonutui/ai-post";

/** `targets` comes from your scheduler, refreshed as each post goes out. */
export function PostCard({
  caption,
  targets,
  publishNow,
}: {
  caption: string;
  targets: PostTarget[];
  publishNow: () => void;
}) {
  return (
    <AIPost
      caption={caption}
      done="Everything is live."
      label="Weekly update"
      onPostNow={publishNow}
      targets={targets}
    />
  );
}

From an AI SDK tool, have a create_post tool return the caption and one entry per account, and pass its output in. Poll the post's status, or stream data parts, to move rows from scheduled to posted.

PROSlash Command Menu and more like it are in Kokonut UI Pro

Installation

AI Post is a free, open-source React component in the Kokonut UI AI collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/ai-post.tsx, so the code is yours to change.

npx shadcn@latest add @kokonutui/ai-post

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

npm install lucide-react motion

Props

prompt
string

The user's message, drawn as a bubble. Only the demo draws one by default.

message
string

What the assistant says above the card.

done
string

Said under the card once every target is live.

label
string

A short name for the post, above the card.

caption
string

The text that goes out.

targets
PostTarget[]

One row per account. Pass them to drive the card from your scheduler; leave them out for the demo.

onPostNow
() => void

Shows Post now while any target is still scheduled.

onEdit
() => void

Shows Edit while any target is still scheduled.

className
string

Extra classes for the root element.

PostTarget

platformrequired
string

"x", "bluesky" and "linkedin" get their marks and limits; any other name gets its initial.

accountrequired
string

The account it posts as, e.g. "@northwind".

statusrequired
PostTargetStatus
when
string

The time, as shown: when it goes out if scheduled, when it went out if posted.

url
string

The live post, for a View link once posted.

error
string

Why it failed, in the platform's own words if you have them.

limit
number

Characters allowed. Defaults to the platform's limit when known.

PostTargetStatus

Where a target is: waiting for its time, going out, live or refused.

type PostTargetStatus = "scheduled" | "posting" | "posted" | "failed";

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.