ActionCard
Una tarjeta que pide hacer una sola cosa: conectar una base de datos, invitar al equipo, agregar un dominio. Su icono, qué es y por qué, y la acción. Hecho, lo dice.
import { ActionCard, ActionCardSkeleton } from '@sypnia/ui/react'
Primeros pasos
Connect a database
Your tables appear here and the agent can read them.
Invite your team
Everyone sees the same errors and fixes.
Add your domain
Mail is sent from your own address.
Código
import { useState } from 'react';
import { ActionCard, Button, CardGrid, LinkButton } from '@sypnia/ui/react';
// Each card asks for one thing, says why, and has its button. Press «Invite» to see a card that is done.
export default function Setup() {
const [invited, setInvited] = useState(false);
return (
<CardGrid min="18rem">
<ActionCard icon="data" title="Connect a database" action={<Button variant="primary" size="sm" icon="plug">Connect</Button>}>Your tables appear here and the agent can read them.</ActionCard>
<ActionCard icon="users" title="Invite your team" done={invited} doneText="2 invitations sent" action={<Button size="sm" icon="user-plus" onClick={() => setInvited(true)}>Invite</Button>}>Everyone sees the same errors and fixes.</ActionCard>
<ActionCard icon="domain" title="Add your domain" action={<LinkButton size="sm" href="#domains">Add a domain</LinkButton>}>Mail is sent from your own address.</ActionCard>
</CardGrid>
);
} En Astro
Read the quick start
Five minutes from nothing to your first error caught.
Install the SDK
One package for the browser and the server.
Listo
Código
---
// The Astro twin: the action is a link in the `action` slot.
import ActionCard from '@sypnia/ui/astro/ActionCard.astro';
import CardGrid from '@sypnia/ui/astro/CardGrid.astro';
---
<CardGrid min="18rem">
<ActionCard icon="book" title="Read the quick start">Five minutes from nothing to your first error caught.<a slot="action" class="sy-btn sy-btn--secondary sy-btn--sm" href="#start">Open the guide</a></ActionCard>
<ActionCard icon="sdk" title="Install the SDK" done>One package for the browser and the server.</ActionCard>
</CardGrid> Skeleton
Connect a database
Your tables appear here and the agent can read them.
Código
import { ActionCard, ActionCardSkeleton, Button, CardGrid } from '@sypnia/ui/react';
// The card and its skeleton side by side.
export default function Skeleton() {
return (
<CardGrid min="18rem">
<ActionCard icon="data" title="Connect a database" action={<Button size="sm">Connect</Button>}>Your tables appear here and the agent can read them.</ActionCard>
<ActionCardSkeleton />
</CardGrid>
);
} Cuándo usarlo
Úsalo cuando
- Los primeros pasos de un proyecto nuevo.
- Una página vacía con dos o tres formas de empezar.
No lo uses cuando
- Pasos que deben hacerse en orden: usa Checklist o Wizard.
Para todos
- El título es un encabezado; la acción es un botón o enlace de verdad, nombrado con un verbo.
- Hecho se dice con palabras, no solo con un chulo.
Props
| ActionCard | Tipo | Por defecto |
|---|---|---|
iconobligatorio | "function" | "error" | "replay" | "performance" | "uptime" | "traces" | "rage-click" | "dead-click" | "alert" | "summary" | "watch" | "sleep" | "light" | "suggestion" | "prompt" | "mcp" | "pull-request" | "git-branch" | "fix" | "check" | "open-source" | "self-host" | "sdk" | "engine" | "signals-in" | "web" | "mobile" | "backend" | "cloud" | "data" | "user" | "clock" | "shield" | "lock" | "mail" | "star" | "copy" | "arrow-right" | "arrow-up-right" | "chevron-down" | "plus" | "close" | "play" | "pause" | "search" | "info" | "warning" | "trash" | "menu" | "download" | "upload" | "filter" | "home" | "table" | "key" | "users" | "sun" | "moon" | "globe" | "sign-out" | "link" | "edit" | "calendar" | "chevron-left" | "chevron-right" | "chevron-up" | "minus" | "more" | "sort" | "arrow-left" | "arrow-up" | "arrow-down" | "arrow-down-right" | "arrow-down-left" | "arrow-up-left" | "swap" | "swap-vertical" | "chevrons-up-down" | "chevrons-left" | "chevrons-right" | "chevrons-down" | "chevrons-up" | "enter" | "undo" | "redo" | "refresh" | "expand" | "collapse" | "fullscreen" | "fullscreen-exit" | "move" | "grip" | "more-vertical" | "trend-up" | "trend-down" | "log-in" | "external" | "slash" | "equal" | "check-small" | "close-small" | "success" | "failure" | "help" | "plus-circle" | "minus-circle" | "ban" | "pending" | "dot" | "dot-off" | "bolt" | "flag" | "pin" | "bookmark" | "heart" | "thumbs-up" | "thumbs-down" | "sparkle" | "target" | "idea" | "award" | "crown" | "bell" | "bell-off" | "bug" | "fire" | "leaf" | "file" | "file-text" | "file-code" | "file-plus" | "file-check" | "file-table" | "file-lock" | "files" | "folder" | "folder-open" | "folder-plus" | "archive" | "clipboard" | "clipboard-check" | "paperclip" | "image" | "save" | "cloud-upload" | "cloud-download" | "cloud-off" | "import" | "export" | "share" | "inbox" | "send" | "box" | "layers" | "tag" | "hash" | "at" | "qr-code" | "book" | "book-open" | "notebook" | "rows" | "columns" | "grid" | "list" | "list-ordered" | "list-checks" | "kanban" | "chart-line" | "chart-bar" | "chart-area" | "chart-parts" | "chart-scatter" | "gauge" | "funnel" | "heatmap" | "sparkline" | "percent" | "sum" | "variable" | "braces" | "brackets" | "null" | "primary-key" | "relation" | "index" | "query" | "backup" | "migrate" | "seed" | "csv" | "json" | "bold" | "italic" | "underline" | "strikethrough" | "heading" | "text" | "paragraph" | "quote" | "code" | "align-left" | "align-center" | "align-right" | "indent" | "outdent" | "unlink" | "scissors" | "eraser" | "highlight" | "duplicate" | "paste" | "wand" | "palette" | "brush" | "ruler" | "crop" | "user-plus" | "user-minus" | "user-check" | "user-x" | "user-circle" | "team" | "organization" | "id-card" | "contact" | "role" | "chat" | "chats" | "comment" | "phone" | "video" | "mic" | "mic-off" | "megaphone" | "rss" | "mail-open" | "handshake" | "wave" | "desktop" | "laptop" | "tablet" | "terminal" | "window" | "browser" | "server" | "cpu" | "memory" | "disk" | "network" | "wifi" | "wifi-off" | "plug" | "power" | "container" | "queue" | "cron" | "webhook" | "api" | "route" | "load-balancer" | "dns" | "domain" | "certificate" | "firewall" | "rocket" | "deploy" | "rollback" | "logs" | "test" | "pipeline" | "commit" | "merge" | "fork" | "release" | "environment" | "region" | "robot" | "agent" | "puzzle" | "credit-card" | "wallet" | "receipt" | "invoice" | "cart" | "bag" | "coins" | "dollar" | "gift" | "plan" | "upgrade" | "usage" | "bank" | "history" | "timer" | "hourglass" | "calendar-check" | "calendar-plus" | "map" | "compass" | "translate" | "accessibility" | "keyboard" | "pointer" | "hand" | "print" | "support" | "stop" | "record" | "skip-forward" | "skip-back" | "fast-forward" | "rewind" | "volume" | "mute" | "camera" | "zoom-in" | "zoom-out" | "eye-off" | "sliders" | "settings" | "toggle" | "sidebar-left" | "sidebar-right" | "panel-bottom" | "split" | "layout" | "dashboard" | "cards" | "density" | "dark-mode" | "theme" | "mouse" | "cursor" | "select" | "picture-in-picture" | "scan" | "unlock" | "shield-off" | "shield-alert" | "shield-user" | "password" | "fingerprint" | "two-factor" | "policy" | "incognito" | "verified" | "audit" | "secret" | "p-telemetry" | "p-cases" | "p-agent" | "p-git" | "p-data" | "p-files" | "p-run" | "p-ai" | "p-mail" | "p-domains" | "p-design" | "p-learn" | "p-skills" | "p-app" | "p-ui" | |
titleobligatorio | ReactNode | |
actionA Button or LinkButton: «Connect a database». | ReactNode | |
childrenWhy it is worth doing, in one or two lines. | ReactNode | |
done | boolean | |
doneTextWhat is said once it is done. Defaults to «Done». | ReactNode |
| ActionCardSkeleton | Tipo | Por defecto |
|---|---|---|
lines | number | 2 |