Feedback

Repo Card

A repository card at an owner/name link: the owner set light, the name bold, and the language marked with both a dot and a word rather than a dot alone.

  • hovercard
  • repository
  • code
  • stats

Preview

1440pxHost theme

Use it with AI

  1. 1. Copy the link.
  2. 2. Write to your agent in your own words and drop the link into the sentence.
  3. 3. The agent opens the link and installs the component from the registry.

put this in the header: https://vibeui.ru/c/hovercard-004?lang=en

Исходники лежат в vibeui/registryvibeui/registryКаталог самодостаточных React-компонентов: один файл, своя палитра, ноль зависимостей.TypeScript 3.1k звёзд 214 форков — наведите, чтобы не открывать вкладку ради описания.

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 "hovercard-004" (Repo 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/hovercard-004.json

Registry item: https://vibeui.ru/r/hovercard-004.json
Installs to: components/vibeui/hovercard-004.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
A repository card at an owner/name link: the owner set light, the name bold, and the language marked with both a dot and a word rather than a dot alone.

A repository card at an owner/name link: description, language and counters. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Hovercard004 } from "@/components/vibeui/hovercard-004"

<Hovercard004
  owner="vibeui"
  repo="registry"
  language="TypeScript"
  stars="3.1k"
/>

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-hovercard-004-* palette — do not swap it for your theme tokens
- the different weights on owner and name: equal weight turns the path into mush
- the language word next to the dot — a coloured dot alone says nothing
- the monospaced link in the text: the path is recognised by shape before hovering
- opening on :focus-within bound to the link wrapper rather than the paragraph
- the paragraph's own light surface: without it the dark text disappears on a dark background

## 6. You may change
- the path through owner and repo, the description through about
- the language through language and its colour through languageColor
- the counters through stars and forks
- the link accent through the --vibeui-hovercard-004-accent variable

## 7. Rules
- Counters arrive as ready strings: shortening to "3.1k" is the caller's job.
- There are no links inside the card — the pointer cannot cross the gap to reach them.
- The language colour is set by hand: the component keeps no lookup table.
- 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/hovercard-004.json
https://vibeui.ru/r/hovercard-004.json

Компонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-hovercard-004-*. Серверный: раскрытие держится на :hover и :focus-within обёртки ссылки. Пара владелец/имя набрана одним размером, но разным весом — так она читается как одно целое и при этом видно, где имя. Цвет языка приходит пропом languageColor и кладётся в --vibeui-hovercard-004-lang. Ссылка в тексте набрана моноширинным шрифтом: путь узнают по форме.

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 Hovercard004Props = Omit<
  ComponentPropsWithoutRef<"div">,
  "children"
> & {
  owner?: string
  repo?: string
  about?: string
  language?: string
  /** Цвет точки языка: у каждого языка он свой и узнаваемый. */
  languageColor?: string
  stars?: string
  forks?: string
}

// Идея компонента: карточка репозитория у ссылки вида владелец/имя. Владелец
// набран тонко, имя — жирно: так пара читается одним взглядом. Язык помечен
// точкой и словом, потому что цветная точка без подписи ничего не говорит.
const STYLES = `
:where([data-vibeui-block="hovercard-004"]){
--vibeui-hovercard-004-bg:oklch(1 0 0);
--vibeui-hovercard-004-fg:oklch(0.22 0.014 265);
--vibeui-hovercard-004-muted:oklch(0.53 0.014 265);
--vibeui-hovercard-004-border:oklch(0.9 0.006 265);
--vibeui-hovercard-004-accent:oklch(0.5 0.16 260);
--vibeui-hovercard-004-lang:oklch(0.72 0.15 85);
--vibeui-hovercard-004-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
--vibeui-hovercard-004-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
}
[data-vibeui-block="hovercard-004"]{
width:100%;max-width:28rem;box-sizing:border-box;
padding:1rem 1.125rem;
border:1px solid var(--vibeui-hovercard-004-border);border-radius:0.875rem;
background:var(--vibeui-hovercard-004-bg);
font-family:var(--vibeui-hovercard-004-font);color:var(--vibeui-hovercard-004-fg);
}
[data-vibeui-block="hovercard-004"] [data-part="line"]{margin:0;font-size:0.875rem;line-height:1.7}
/* Карточка цепляется к паре владелец/имя, а не ко всему абзацу. */
[data-vibeui-block="hovercard-004"] [data-part="host"]{position:relative;display:inline-block}
[data-vibeui-block="hovercard-004"] [data-part="link"]{
font-family:var(--vibeui-hovercard-004-mono);font-size:0.9375em;
color:var(--vibeui-hovercard-004-accent);text-decoration:none;
border-bottom:1px solid color-mix(in oklab,var(--vibeui-hovercard-004-accent) 35%,transparent);
border-radius:0.125rem;
}
[data-vibeui-block="hovercard-004"] [data-part="link"]:hover{border-bottom-color:var(--vibeui-hovercard-004-accent)}
[data-vibeui-block="hovercard-004"] [data-part="link"]:focus-visible{outline:2px solid var(--vibeui-hovercard-004-accent);outline-offset:2px}
[data-vibeui-block="hovercard-004"] [data-part="card"]{
position:absolute;left:0;top:calc(100% + 0.5rem);z-index:20;
display:flex;flex-direction:column;gap:0.4375rem;
width:18rem;box-sizing:border-box;padding:0.8125rem 0.875rem;
border:1px solid var(--vibeui-hovercard-004-border);border-radius:0.875rem;
background:var(--vibeui-hovercard-004-bg);
box-shadow:0 22px 46px -28px oklch(0.2 0.02 265 / 55%);
opacity:0;visibility:hidden;translate:0 -0.25rem;
transition:opacity .15s ease,translate .15s ease,visibility .15s;
}
[data-vibeui-block="hovercard-004"] [data-part="host"]:hover [data-part="card"],
[data-vibeui-block="hovercard-004"] [data-part="host"]:focus-within [data-part="card"]{opacity:1;visibility:visible;translate:0 0}
/* Владелец тонкий, имя жирное: пара читается как одно целое. */
[data-vibeui-block="hovercard-004"] [data-part="path"]{font-size:0.9375rem;line-height:1.25;letter-spacing:-0.01em}
[data-vibeui-block="hovercard-004"] [data-part="owner"]{color:var(--vibeui-hovercard-004-muted);font-weight:450}
[data-vibeui-block="hovercard-004"] [data-part="repo"]{font-weight:700}
[data-vibeui-block="hovercard-004"] [data-part="about"]{display:block;margin:0;font-size:0.8125rem;line-height:1.45;color:var(--vibeui-hovercard-004-muted)}
[data-vibeui-block="hovercard-004"] [data-part="meta"]{
display:flex;align-items:center;gap:0.875rem;flex-wrap:wrap;
font-size:0.75rem;color:var(--vibeui-hovercard-004-muted);
}
[data-vibeui-block="hovercard-004"] [data-part="lang"]{display:inline-flex;align-items:center;gap:0.3125rem}
[data-vibeui-block="hovercard-004"] [data-part="bullet"]{
width:0.625rem;height:0.625rem;border-radius:9999px;flex:none;
background:var(--vibeui-hovercard-004-lang);
box-shadow:inset 0 0 0 1px oklch(0 0 0 / 10%);
}
[data-vibeui-block="hovercard-004"] [data-part="stat"]{display:inline-flex;align-items:center;gap:0.25rem;font-variant-numeric:tabular-nums}
[data-vibeui-block="hovercard-004"] [data-part="stat"] b{color:var(--vibeui-hovercard-004-fg);font-weight:650}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="hovercard-004"] *{animation:none!important;transition:none!important}}
`

/**
 * Карточка репозитория у ссылки владелец/имя: описание, язык и счётчики.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Hovercard004({
  owner = "vibeui",
  repo = "registry",
  about = "Каталог самодостаточных React-компонентов: один файл, своя палитра, ноль зависимостей.",
  language = "TypeScript",
  languageColor = "oklch(0.62 0.14 250)",
  stars = "3.1k",
  forks = "214",
  className,
  style,
  ...props
}: Hovercard004Props) {
  const palette = {
    "--vibeui-hovercard-004-lang": languageColor,
    ...style,
  } as CSSProperties

  return (
    <>
      <style href="vibeui-hovercard-004" precedence="medium">
        {STYLES}
      </style>
      <div
        {...props}
        data-vibeui-block="hovercard-004"
        className={className}
        style={palette}
      >
        <p data-part="line">
          Исходники лежат в{" "}
          <span data-part="host">
            <a
              data-part="link"
              href="#repo"
              aria-describedby="vibeui-hovercard-004-card"
            >
              {owner}/{repo}
            </a>
            <span
              data-part="card"
              id="vibeui-hovercard-004-card"
              role="tooltip"
            >
              <span data-part="path">
                <span data-part="owner">{owner}/</span>
                <span data-part="repo">{repo}</span>
              </span>
              <span data-part="about">{about}</span>
              <span data-part="meta">
                <span data-part="lang">
                  <span data-part="bullet" aria-hidden="true" />
                  {language}
                </span>
                <span data-part="stat">
                  <span aria-hidden="true">★</span> <b>{stars}</b> звёзд
                </span>
                <span data-part="stat">
                  <span aria-hidden="true">⑂</span> <b>{forks}</b> форков
                </span>
              </span>
            </span>
          </span>{" "}
          — наведите, чтобы не открывать вкладку ради описания.
        </p>
      </div>
    </>
  )
}