BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/fable-ui/suggested-actions

SuggestedActions

fable-ui/suggested-actions
FreeComponent

Render safe follow-up prompts from a validated AI tool payload.

Live preview

live · rendered by the registry
Rendered by fable-ui on their own page — this is the component running, not a screenshot of it.

Install it

npx shadcn@latest add https://fable-ui.shobky.com/r/suggested-actions.json

Source

components/fable-ui/suggested-actions/suggested-actions.tsxfable-ui.shobky.com/r/suggested-actions.json
1"use client"
2
3import { Badge } from "@/components/ui/badge"
4import { Button } from "@/components/ui/button"
5import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"
6
7export type SuggestedAction = {
8 label: string
9 prompt: string
10 description?: string
11}
12
13export type SuggestedActionsProps = {
14 title: string
15 description?: string
16 actions: SuggestedAction[]
17 isLoading?: boolean
18 isDisabled?: boolean
19 error?: {
20 title: string
21 description?: string
22 }
23 onAction?: (action: SuggestedAction) => void
24}
25
26export function SuggestedActions({
27 title,
28 description,
29 actions,
30 isLoading,
31 isDisabled,
32 error,
33 onAction,
34}: SuggestedActionsProps) {
35 const areActionsDisabled = isDisabled || !onAction
36
37 return (
38 <Card className="w-full max-w-2xl" data-fable-ui="suggested-actions" aria-busy={isLoading || undefined}>
39 <CardHeader>
40 <div className="flex items-start justify-between gap-3">
41 <div className="flex flex-col gap-1">
42 <CardTitle className="text-base">{title || "Suggested actions"}</CardTitle>
43 {description ? <CardDescription>{description}</CardDescription> : null}
44 </div>
45 <Badge variant="secondary">safe prompts</Badge>
46 </div>
47 </CardHeader>
48 <CardContent className="flex flex-col gap-3">
49 {isLoading ? (
50 <p className="text-sm text-muted-foreground">Preparing suggestions...</p>
51 ) : error ? (
52 <div className="rounded-md border border-destructive/20 bg-destructive/5 p-3">
53 <p className="text-sm font-medium text-destructive">{error.title}</p>
54 {error.description ? <p className="text-sm text-muted-foreground">{error.description}</p> : null}
55 </div>
56 ) : actions.length === 0 ? (
57 <p className="text-sm text-muted-foreground">No safe follow-up actions are available.</p>
58 ) : (
59 actions.map((action) => (
60 <Button
61 key={`${action.label}-${action.prompt}`}
62 type="button"
63 variant="outline"
64 className="h-auto justify-start whitespace-normal px-3 py-2 text-left "
65 disabled={areActionsDisabled}
66 onClick={() => onAction?.(action)}
67 >
68 <span className="flex flex-col gap-1">
69 <span>{action.label}</span>
70 {action.description ? (
71// … truncated

What it pulls in

npm packages

  • ai
  • zod

Other registry items

  • card
  • button
  • badge
  • shobky/fable-ui/core

Files it writes

  • components/fable-ui/suggested-actions/suggested-actions.tsx
  • components/fable-ui/suggested-actions/index.ts
  • lib/fable-ui/tools/show-next-actions-tool.ts
  • lib/fable-ui/manifests/show-next-actions.md

Facts

Registry
fable-ui
Type
registry:component
Access
Free
Files written
4
Licence
MIT
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

Docs on fable-ui fable-ui.shobky.com shobky/fable-ui on GitHub Raw registry item This item as JSON

More from fable-ui

All 10 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
ConfirmationCardconfirmation-cardfable-uiComponentsFree2 deps · 4 files
FormCardform-cardfable-uiComponentsFree2 deps · 4 files
MetricCardmetric-cardfable-uiComponentsFree3 deps · 4 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex