- Agent Status
- Agent Template Card
- API Key Card
- Button
- Channel Status Card
- Chat Composer
- Code Editor
- Condition Builder
- Confirm Dialog
- Conversation
- Dataset Card
- Document Status Badge
- Extraction Strategy Select
- File Icon
- File Upload
- Indexing Progress
- Matrix
- Message
- Model Diff View
- Model Selector
- Model Type Filter
- Node Catalog
- Option Editor
- Output Variables View
- Package Card
- Prompt Editor
- Provider Status Card
- Radio Card
- Resource Card
- Resource Sidebar
- Response
- Run Node List
- Segment Card
- Shimmering Text
- Token Trend Chart
- Tool Call Card
- Usage Stat Card
- Variable Binding Editor
- Variable Selector
- Workflow Node Card
- Workspace Selector
Primary buttons
Use once per surface for the main agent action.
Secondary buttons
Neutral supporting actions inside the same workflow.
Outline buttons
Utility actions such as copy, rotate, and settings.
Soft buttons
Low-intensity ZGI Blue actions for empty states and hints.
Buttons with leading icon
Use when the icon clarifies a command.
Buttons with trailing icon
Use for forward motion, deploys, and external flows.
Icon buttons
Compact toolbar actions. Always provide an accessible label.
States
Show progress and destructive actions without changing size.
import {
ArrowRightIcon,
CheckIcon,
CopyIcon,
DownloadIcon,
LoaderCircleIcon,
PlayIcon,
PlusIcon,
SettingsIcon,
Trash2Icon,
} from "lucide-react"
import { Button } from "@/components/ui/button"
const sections = [
{
title: "Primary buttons",
description: "Use once per surface for the main agent action.",
items: [
<Button key="primary-sm" size="sm">
Small
</Button>,
<Button key="primary">Button</Button>,
<Button key="primary-lg" size="lg">
Large button
</Button>,
],
},
{
title: "Secondary buttons",
description: "Neutral supporting actions inside the same workflow.",
items: [
<Button key="secondary-sm" size="sm" variant="secondary">
Small
</Button>,
<Button key="secondary" variant="secondary">
Button
</Button>,
<Button key="secondary-lg" size="lg" variant="secondary">
Large button
</Button>,
],
},
{
title: "Outline buttons",
description: "Utility actions such as copy, rotate, and settings.",
items: [
<Button key="outline-sm" size="sm" variant="outline">
Small
</Button>,
<Button key="outline" variant="outline">
Button
</Button>,
<Button key="outline-lg" size="lg" variant="outline">
Large button
</Button>,
],
},
{
title: "Soft buttons",
description: "Low-intensity ZGI Blue actions for empty states and hints.",
items: [
<Button key="soft-sm" size="sm" variant="soft">
Small
</Button>,
<Button key="soft" variant="soft">
Button
</Button>,
<Button key="soft-lg" size="lg" variant="soft">
Large button
</Button>,
],
},
{
title: "Buttons with leading icon",
description: "Use when the icon clarifies a command.",
items: [
<Button key="leading-primary">
<PlusIcon className="size-4" />
New agent
</Button>,
<Button key="leading-outline" variant="outline">
<CopyIcon className="size-4" />
Copy key
</Button>,
<Button key="leading-secondary" variant="secondary">
<SettingsIcon className="size-4" />
Configure
</Button>,
],
},
{
title: "Buttons with trailing icon",
description: "Use for forward motion, deploys, and external flows.",
items: [
<Button key="trailing-primary">
Deploy
<ArrowRightIcon className="size-4" />
</Button>,
<Button key="trailing-outline" variant="outline">
Export
<DownloadIcon className="size-4" />
</Button>,
<Button key="trailing-soft" variant="soft">
Run agent
<PlayIcon className="size-4" />
</Button>,
],
},
{
title: "Icon buttons",
description: "Compact toolbar actions. Always provide an accessible label.",
items: [
<Button key="icon-primary" size="icon" aria-label="Run agent">
<PlayIcon className="size-4" />
</Button>,
<Button
key="icon-outline"
size="icon"
variant="outline"
aria-label="Settings"
>
<SettingsIcon className="size-4" />
</Button>,
<Button key="icon-ghost" size="icon" variant="ghost" aria-label="Copy">
<CopyIcon className="size-4" />
</Button>,
<Button
key="icon-danger"
size="icon"
variant="destructive"
aria-label="Delete"
>
<Trash2Icon className="size-4" />
</Button>,
],
},
{
title: "States",
description: "Show progress and destructive actions without changing size.",
items: [
<Button key="loading" disabled>
<LoaderCircleIcon className="size-4 animate-spin" />
Deploying
</Button>,
<Button key="complete" variant="secondary">
<CheckIcon className="size-4" />
Synced
</Button>,
<Button key="danger" variant="destructive">
<Trash2Icon className="size-4" />
Revoke key
</Button>,
<Button key="link" variant="link" className="px-0">
Read guide
</Button>,
],
},
]
export function ButtonDemo() {
return (
<div className="w-full max-w-3xl overflow-hidden rounded-lg border bg-white shadow-[0_12px_40px_rgba(10,11,13,0.06)]">
{sections.map((section) => (
<section
key={section.title}
className="grid gap-3 border-b p-4 last:border-b-0 sm:grid-cols-[190px_minmax(0,1fr)]"
>
<div>
<h3 className="text-sm font-semibold">{section.title}</h3>
<p className="text-muted-foreground mt-1 text-xs leading-5">
{section.description}
</p>
</div>
<div className="flex min-w-0 flex-wrap items-center gap-2">
{section.items}
</div>
</section>
))}
</div>
)
}
Installation
pnpm dlx shadcn@latest add https://ui.zgi.ai/r/button.jsonpnpm dlx shadcn@latest add https://ui.zgi.ai/r/button.json
yarn dlx shadcn@latest add https://ui.zgi.ai/r/button.jsonComponent
import * as React from "react"
import { Slot } from "@radix-ui/react-slot"
import { cva, type VariantProps } from "class-variance-authority"
import { cn } from "@/lib/utils"
const buttonVariants = cva(
"inline-flex items-center justify-center gap-1.5 whitespace-nowrap rounded-[4px] text-sm font-medium transition-colors disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[2px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
{
variants: {
variant: {
default: "bg-primary text-primary-foreground hover:bg-primary/90",
destructive:
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
outline:
"border bg-background hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
secondary:
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
soft: "bg-primary/10 text-primary hover:bg-primary/15",
ghost:
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
link: "text-primary underline-offset-4 hover:underline",
},
size: {
default: "h-8 px-3.5 has-[>svg]:px-3",
sm: "h-7 px-2.5 text-xs has-[>svg]:px-2",
lg: "h-9 px-4 has-[>svg]:px-3.5",
icon: "size-8",
},
},
defaultVariants: {
variant: "default",
size: "default",
},
}
)
function Button({
className,
variant,
size,
asChild = false,
...props
}: React.ComponentProps<"button"> &
VariantProps<typeof buttonVariants> & {
asChild?: boolean
}) {
const Comp = asChild ? Slot : "button"
return (
<Comp
data-slot="button"
className={cn(buttonVariants({ variant, size, className }))}
{...props}
/>
)
}
export { Button, buttonVariants }
Usage
import { Button } from "@/components/ui/button"export function Example() {
return (
<Button>
Deploy agent
</Button>
)
}Variants
Use default for the primary action in a surface. Use secondary and outline for supporting actions. Use ghost for low-emphasis toolbar actions, link for inline navigation, and destructive only for irreversible operations.
<Button>Deploy</Button>
<Button variant="secondary">Configure</Button>
<Button variant="outline">Copy API key</Button>
<Button variant="soft">Run agent</Button>
<Button variant="ghost">View logs</Button>
<Button variant="destructive">Revoke key</Button>Design Guidelines
ZGI buttons use a restrained console style: 4px radius, compact height, clear hierarchy, and one primary action per surface. Keep buttons operational rather than decorative.
Radius
Use 4px for all button sizes. This keeps actions crisp and stable inside agent consoles, tables, sidebars, and dense workflow panels.
Sizing
| Size | Height | Usage |
|---|---|---|
sm | 28px | Dense tables, inline rows, compact sidebars. |
default | 32px | Standard console actions. |
lg | 36px | Primary action in an empty state or setup flow. |
icon | 32px | Toolbar actions and compact command groups. |
Colors
| Variant | Usage |
|---|---|
default | Primary ZGI Blue action, such as deploy, run, save, or confirm. |
secondary | Neutral supporting action inside the same panel. |
outline | Utility actions such as copy, rotate, sync, or configure. |
soft | Low-intensity ZGI Blue action for hints, empty states, and secondary agent actions. |
ghost | Toolbar and inline panel actions with low emphasis. |
destructive | Revoke, delete, disconnect, or irreversible operations. |
link | Text-level navigation, never the main action. |
Hierarchy
Use only one default button in a local decision area. Put secondary actions to the right or after it, and keep destructive actions visually separated when possible.
Props
| Prop | Type | Default |
|---|---|---|
| variant | "default" | "destructive" | "outline" | "secondary" | "soft" | "ghost" | "link" | "default" |
| size | "default" | "sm" | "lg" | "icon" | "default" |
| asChild | boolean | false |