BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/solanaui/position-card

Position Card

solanaui/position-card
FreeComponent

A card displaying an open trading position with side indicator, token icon, size, leverage, entry/mark prices, and P&L.

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/position-card.json

Source

src/registry/sol/position-card.tsxwww.solanaui.dev/r/position-card.json
1import type React from "react";
2import { TokenIcon } from "@/registry/sol/token-icon";
3import { Card, CardContent, CardFooter } from "@/components/ui/card";
4import { cn } from "@/lib/utils";
5
6interface PositionCardProps extends React.ComponentProps<typeof Card> {
7 symbol: string;
8 icon: string;
9 amount: string;
10 value: string;
11 apy?: string;
12 trend?: "up" | "down";
13 children?: React.ReactNode;
14}
15
16const PositionCard = ({
17 symbol,
18 icon,
19 amount,
20 value,
21 apy,
22 trend = "up",
23 children,
24 className,
25 ...props
26}: PositionCardProps) => {
27 return (
28 <Card className={cn("p-4 w-full gap-3", className)} {...props}>
29 <CardContent className="flex items-center justify-between p-0 pb-2">
30 <div className="flex items-center gap-3">
31 <TokenIcon src={icon} alt={symbol} width={48} height={48} />
32 <div className="flex flex-col">
33 <span className="text-xl font-medium">{symbol}</span>
34 {apy && (
35 <span
36 className={cn(
37 "text-xs font-medium",
38 trend === "up" ? "text-emerald-500" : "text-red-400",
39 )}
40 >
41 {apy} APY
42 </span>
43 )}
44 </div>
45 </div>
46 <div className="flex flex-col items-end">
47 <span className="text-2xl font-medium">{amount}</span>
48 <span className="text-sm text-muted-foreground">{value}</span>
49 </div>
50 </CardContent>
51
52 {children && <CardFooter className="p-0">{children}</CardFooter>}
53 </Card>
54 );
55};
56
57export type { PositionCardProps };
58export { PositionCard };

What it pulls in

Other registry items

  • card
  • https://solanaui.dev/r/token-icon.json

Files it writes

  • src/registry/sol/position-card.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
Action Boxaction-boxsolanauiComponentsFreeno deps
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
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