Badge

New Pulse

A "new" badge with an expanding ripple: only a separate layer animates, so with animation off the dot stays in place.

  • badge
  • new
  • pulse
  • attention

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/badge-017?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 "badge-017" (New Pulse) 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/badge-017.json

Registry item: https://vibeui.ru/r/badge-017.json
Installs to: components/vibeui/badge-017.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 "new" badge with an expanding ripple: only a separate layer animates, so with animation off the dot stays in place.

A "new" badge where the ripple is a separate layer above a static dot, and with animation off the dot itself remains. Zero dependencies, one file, no client JS.

## 3. How to use it
import { Badge017 } from "@/components/vibeui/badge-017"

<Badge017 tone="accent" waves={2}>
  New
</Badge017>

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-badge-017-* palette — do not swap it for your theme tokens
- the split between core and ripple: animating the dot itself loses the badge under reduced-motion
- removing the rings under prefers-reduced-motion rather than just animation:none — otherwise a ring freezes expanded
- the delay between waves: simultaneous rings turn into blinking
- the text caption next to the dot: one pulsing dot does not say what is new
- the badge's own light surface: without it the dark text disappears on a dark background

## 6. You may change
- the tone through tone
- the number of rings through waves
- the caption through children
- the ripple speed in the animation rule

## 7. Rules
- Three rings is the maximum: more merge into noise and stop reading as one signal.
- The badge draws attention permanently — remove it once the news is no longer news, or it devalues.
- The ripple leaves the badge box only visually: it does not move layout, but a parent with overflow:hidden clips it.
- 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/badge-017.json
https://vibeui.ru/r/badge-017.json

Один файл, ноль зависимостей, палитра в локальных переменных --vibeui-badge-017-*. Серверный: хуков нет. Маяк собран из двух слоёв — неподвижного ядра и колец, которые расходятся анимацией vibeui-badge-017-ripple; каждое кольцо получает свою задержку через инлайновую переменную --vibeui-badge-017-delay, поэтому волны идут одна за другой, а не мигают вместе. Правило prefers-reduced-motion не просто гасит анимацию, а убирает кольца совсем: застывшее раскрытое кольцо вокруг точки читалось бы как сломанная вёрстка. Тон переключается data-tone и меняет только --hue и --chroma.

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 Badge017Props = ComponentPropsWithoutRef<"span"> & {
  tone?: "accent" | "positive" | "danger"
  waves?: number
}

// Идея компонента: метка «новое» с расходящейся волной. Волна — отдельный
// слой поверх точки, а не сама точка: анимируется только он, поэтому при
// выключенной анимации точка остаётся на месте и метка не исчезает. Волн
// может быть несколько, каждая уходит со своей задержкой — сигнал читается
// боковым зрением, но не мигает.
const STYLES = `
:where([data-vibeui-block="badge-017"]){
--vibeui-badge-017-hue:265;
--vibeui-badge-017-chroma:0.16;
--vibeui-badge-017-mark:oklch(0.58 var(--vibeui-badge-017-chroma) var(--vibeui-badge-017-hue));
--vibeui-badge-017-bg:oklch(0.97 calc(var(--vibeui-badge-017-chroma) * 0.1) var(--vibeui-badge-017-hue));
--vibeui-badge-017-fg:oklch(0.36 calc(var(--vibeui-badge-017-chroma) * 0.55) var(--vibeui-badge-017-hue));
--vibeui-badge-017-border:oklch(0.9 calc(var(--vibeui-badge-017-chroma) * 0.2) var(--vibeui-badge-017-hue));
--vibeui-badge-017-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="badge-017"]{
display:inline-flex;align-items:center;gap:0.4375rem;
box-sizing:border-box;height:1.75rem;padding:0 0.6875rem;
border:1px solid var(--vibeui-badge-017-border);border-radius:9999px;
background:var(--vibeui-badge-017-bg);color:var(--vibeui-badge-017-fg);
font-family:var(--vibeui-badge-017-font);font-size:0.6875rem;font-weight:700;line-height:1;
letter-spacing:0.06em;text-transform:uppercase;vertical-align:middle;
}
[data-vibeui-block="badge-017"][data-tone="positive"]{--vibeui-badge-017-hue:150;--vibeui-badge-017-chroma:0.13}
[data-vibeui-block="badge-017"][data-tone="danger"]{--vibeui-badge-017-hue:25;--vibeui-badge-017-chroma:0.19}
[data-vibeui-block="badge-017"] [data-part="beacon"]{
position:relative;flex:none;width:0.4375rem;height:0.4375rem;
}
[data-vibeui-block="badge-017"] [data-part="core"]{
position:absolute;inset:0;border-radius:9999px;
background:var(--vibeui-badge-017-mark);
}
[data-vibeui-block="badge-017"] [data-part="wave"]{
position:absolute;inset:0;border-radius:9999px;
border:1.5px solid var(--vibeui-badge-017-mark);
animation:vibeui-badge-017-ripple 2.4s ease-out infinite;
animation-delay:var(--vibeui-badge-017-delay,0s);
}
@keyframes vibeui-badge-017-ripple{
0%{transform:scale(1);opacity:.6}
70%{transform:scale(2.6);opacity:0}
100%{transform:scale(2.6);opacity:0}
}
/* Волна отключается целиком, а не замирает раскрытой: застывшее кольцо
   вокруг точки читается как ошибка вёрстки. Сама точка остаётся. */
@media (prefers-reduced-motion:reduce){
[data-vibeui-block="badge-017"] *{animation:none!important;transition:none!important}
[data-vibeui-block="badge-017"] [data-part="wave"]{display:none}
}
`

/**
 * Метка «новое» с расходящейся волной поверх точки.
 * Один файл, ноль зависимостей, собственная палитра.
 */
export function Badge017({
  tone = "accent",
  waves = 2,
  className,
  style,
  children = "Новое",
  ...props
}: Badge017Props) {
  const count = Math.min(3, Math.max(0, Math.round(waves)))

  return (
    <>
      <style href="vibeui-badge-017" precedence="medium">
        {STYLES}
      </style>
      <span
        {...props}
        data-vibeui-block="badge-017"
        data-tone={tone}
        className={className}
        style={style as CSSProperties}
      >
        <span data-part="beacon" aria-hidden="true">
          {Array.from({ length: count }, (_, index) => (
            <span
              key={index}
              data-part="wave"
              style={
                {
                  "--vibeui-badge-017-delay": `${index * 0.8}s`,
                } as CSSProperties
              }
            />
          ))}
          <span data-part="core" />
        </span>
        {children}
      </span>
    </>
  )
}