BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/solanaui/action-box

Action Box

solanaui/action-box
FreeComponent

A configurable action form with token input, detail rows, and submit button for DeFi operations like staking, lending, and closing positions.

Live preview

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

Install it

npx shadcn@latest add https://www.solanaui.dev/r/action-box.json

Source

src/registry/sol/action-box.tsxwww.solanaui.dev/r/action-box.json
1import { TokenInput } from "@/registry/sol/token-input";
2import { Button } from "@/components/ui/button";
3import { Separator } from "@/components/ui/separator";
4import type { DetailRow } from "@/registry/lib/types";
5import { cn } from "@/lib/utils";
6
7type ActionBoxDetail = DetailRow;
8
9interface ActionBoxProps {
10 tokens: { icon: string; symbol: string }[];
11 defaultToken?: string;
12 balance?: string;
13 label?: string;
14 details?: ActionBoxDetail[];
15 submitLabel?: string;
16 onSubmit?: () => void;
17 className?: string;
18}
19
20const ActionBox = ({
21 tokens,
22 defaultToken,
23 balance,
24 label,
25 details,
26 submitLabel = "Submit",
27 onSubmit,
28 className,
29}: ActionBoxProps) => {
30 return (
31 <div className={cn("flex flex-col gap-4 border rounded-lg p-4", className)}>
32 {label && (
33 <span className="text-sm font-medium text-muted-foreground">
34 {label}
35 </span>
36 )}
37 <TokenInput
38 tokens={tokens}
39 defaultToken={defaultToken}
40 balance={balance}
41 />
42 {details && details.length > 0 && (
43 <>
44 <Separator />
45 <div className="flex flex-col gap-1.5 text-sm">
46 {details.map((detail) => (
47 <div key={detail.label} className="flex justify-between">
48 <span className="text-muted-foreground">{detail.label}</span>
49 <span className={detail.className}>{detail.value}</span>
50 </div>
51 ))}
52 </div>
53 </>
54 )}
55 <Button className="w-full" size="lg" onClick={onSubmit}>
56 {submitLabel}
57 </Button>
58 </div>
59 );
60};
61
62export type { ActionBoxProps, ActionBoxDetail };
63export { ActionBox };

What it pulls in

Other registry items

  • button
  • separator
  • https://solanaui.dev/r/token-input.json
  • https://solanaui.dev/r/sol-lib-types.json

Files it writes

  • src/registry/sol/action-box.tsx

Facts

Registry
solanaui
Type
registry:component
Access
Free
Files written
1
Licence
the repository states none
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

Docs on solanaui www.solanaui.dev chambaz/solanaui on GitHub Raw registry item This item as JSON

More from solanaui

All 31 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Activity Feedactivity-feedsolanauiComponentsFree1 dep
Address Displayaddress-displaysolanauiComponentsFree1 dep
Auth Cardauth-cardsolanauiComponentsFreeno deps
Health Barhealth-barsolanauiComponentsFreeno deps
Leverage Sliderleverage-slidersolanauiComponentsFreeno deps
NFT Cardnft-cardsolanauiComponentsFreeno deps
Order Bookorder-booksolanauiComponentsFreeno deps
Order Formorder-formsolanauiComponentsFree1 dep
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