Card
Add Card
An empty "add" card: dashed and transparent, because it holds no data and must not look like a real one.
- card
- empty
- add
- grid
Preview
1440pxHost theme
Use it with AI
- 1. Copy the link.
- 2. Write to your agent in your own words and drop the link into the sentence.
- 3. The agent opens the link and installs the component from the registry.
put this in the header: https://vibeui.ru/c/card-008?lang=en
Show the full instructions
What the link says, spelled out. Use it when your agent cannot open links — paste this text instead.
# Install and place "card-008" (Add Card) from VibeUI
## 1. Install first — do not skip, do not recreate
Run this exact command before writing any code:
npx shadcn@latest add https://vibeui.ru/r/card-008.json
Registry item: https://vibeui.ru/r/card-008.json
Installs to: components/vibeui/card-008.tsx (the exact path follows this project's components.json aliases).
npm dependencies: none.
Registry dependencies: none.
Install it from the registry. Do not recreate it from the description,
do not substitute a similar component from another library, and do not
rewrite it to match the project's existing style.
## 2. What it is
An empty "add" card: dashed and transparent, because it holds no data and must not look like a real one.
An add card: a dashed border, a plus and a line explaining what appears after the click. Zero dependencies, one file, no client JS.
## 3. How to use it
import { Card008 } from "@/components/vibeui/card-008"
<Card008 title="Add a project" hint="An empty project with one page" />
Read the installed file for the full prop list.
## 4. Where to place it
This is a small inline component. Put it exactly where the user asked,
inside the existing markup. Do not create a new page, section or
wrapper for it. If a similar control already sits in that spot,
replace it instead of adding a second one.
Placement: ___
(The user fills this line in. If it is still blank, ask where to put it
instead of guessing.)
## 5. Keep exactly as installed
- the local --vibeui-card-008-* palette — do not swap it for your theme tokens
- the dashed border and transparent fill: a solid card reads as another data item
- a button rather than a div with onClick — role and keyboard come free
- the line explaining the outcome: a plus does not say what appears
- the minimum height matching the real cards
- the visible focus ring
## 6. You may change
- title — what gets added
- hint — what appears afterwards
- the accent through the accent prop
- the minimum height for your grid
## 7. Rules
- The empty card belongs last in the grid: existing things come first.
- If permissions forbid adding, hide the card rather than disabling it.
- The dashed border signals a placeholder: never use it on real cards.
- Do not lift the CSS variables into globals.css: the component has to stay a single file.
## 8. Verify
- it renders with no console errors;
- it looks like the preview on the VibeUI page you copied this from;
- if it does not, you changed something listed in section 5 — put it back.For developers
npx shadcn@latest add https://vibeui.ru/r/card-008.jsonhttps://vibeui.ru/r/card-008.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-card-008-*. Серверный: хуков нет. Корень — <button>, а не div с onClick: роль, клавиатура и фокус достаются даром. Минимальная высота задана так, чтобы карточка совпадала с настоящими в ряду. Плюс нарисован кругом с двумя псевдоэлементами.
Component source
The same file your agent installs. Here in case you would rather copy it by hand.
import type { ComponentPropsWithoutRef, CSSProperties } from "react"
export type Card008Props = Omit<
ComponentPropsWithoutRef<"button">,
"children" | "title"
> & {
title?: string
hint?: string
accent?: string
}
// Идея компонента: пустая карточка «добавить» в сетке. Она пунктирная и
// прозрачная, потому что не содержит данных: сплошная карточка в ряду с
// настоящими читается как ещё один элемент. Это кнопка, а не div с onClick —
// клавиатура и объявление роли достаются даром.
const STYLES = `
:where([data-vibeui-block="card-008"]){
--vibeui-card-008-fg:oklch(0.42 0.014 265);
--vibeui-card-008-muted:oklch(0.58 0.014 265);
--vibeui-card-008-border:oklch(0.86 0.008 265);
--vibeui-card-008-hover:oklch(0.97 0.003 265);
--vibeui-card-008-accent:oklch(0.55 0.17 265);
--vibeui-card-008-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="card-008"]{
appearance:none;cursor:pointer;
display:flex;flex-direction:column;align-items:center;justify-content:center;gap:0.375rem;
width:100%;max-width:15rem;min-height:9.5rem;box-sizing:border-box;padding:1rem;
/* Пунктир и прозрачный фон: карточка не содержит данных и не должна
выглядеть как настоящая. */
border:1.5px dashed var(--vibeui-card-008-border);border-radius:0.875rem;
background:transparent;color:var(--vibeui-card-008-fg);
font-family:var(--vibeui-card-008-font);text-align:center;
transition:border-color .16s ease,background-color .16s ease;
}
[data-vibeui-block="card-008"]:hover{background:var(--vibeui-card-008-hover);border-color:var(--vibeui-card-008-accent)}
[data-vibeui-block="card-008"]:focus-visible{outline:2px solid var(--vibeui-card-008-accent);outline-offset:2px}
[data-vibeui-block="card-008"] [data-part="plus"]{
position:relative;width:2rem;height:2rem;border-radius:9999px;
border:1.5px solid var(--vibeui-card-008-border);
}
[data-vibeui-block="card-008"] [data-part="plus"]::before,
[data-vibeui-block="card-008"] [data-part="plus"]::after{
content:"";position:absolute;left:50%;top:50%;background:currentColor;border-radius:9999px;
}
[data-vibeui-block="card-008"] [data-part="plus"]::before{width:0.875rem;height:1.5px;margin:-0.75px 0 0 -0.4375rem}
[data-vibeui-block="card-008"] [data-part="plus"]::after{width:1.5px;height:0.875rem;margin:-0.4375rem 0 0 -0.75px}
[data-vibeui-block="card-008"]:hover [data-part="plus"]{border-color:var(--vibeui-card-008-accent)}
[data-vibeui-block="card-008"] [data-part="title"]{font-size:0.875rem;font-weight:650;line-height:1.3}
[data-vibeui-block="card-008"] [data-part="hint"]{font-size:0.75rem;line-height:1.4;color:var(--vibeui-card-008-muted);max-width:11rem}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="card-008"] *{animation:none!important;transition:none!important}}
`
/**
* Пустая карточка «добавить»: пунктир, плюс и подпись, что появится.
* Один файл, ноль зависимостей, собственная палитра.
*/
export function Card008({
title = "Добавить проект",
hint = "Пустой проект с одной страницей и вашей темой",
accent,
type = "button",
className,
style,
...props
}: Card008Props) {
const palette = {
...(accent ? { "--vibeui-card-008-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-card-008" precedence="medium">
{STYLES}
</style>
<button
{...props}
type={type}
data-vibeui-block="card-008"
className={className}
style={palette}
>
<span data-part="plus" aria-hidden="true" />
<span data-part="title">{title}</span>
{hint ? <span data-part="hint">{hint}</span> : null}
</button>
</>
)
}