Buttons
Outline Button
A button carried by its outline: paper inside, accent contour outside, three line weights; on hover the fill and the border swap places.
- button
- outline
- secondary
- border
Preview
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/button-034?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 "button-034" (Outline Button) 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/button-034.json
Registry item: https://vibeui.ru/r/button-034.json
Installs to: components/vibeui/button-034.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 button carried by its outline: paper inside, accent contour outside, three line weights; on hover the fill and the border swap places.
An outlined button with a paper middle, so it reads on both light and dark backgrounds. The line weight is a single variable with three values of the emphasis prop, and the round mark inherits it. On hover the button inverts: the accent moves into the fill and the label goes light. Zero dependencies, one file.
## 3. How to use it
import { Button034 } from "@/components/vibeui/button-034"
<Button034 emphasis="regular" onClick={openPricing}>
See plan details
</Button034>
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 paper fill inside the contour: without it the button vanishes on a dark background
- the line weight as one variable shared by the border and the mark — otherwise the two lines differ inside one shape
- the three emphasis values as a weight scale, not as three separate styles
- the inversion on hover: the accent moves from the line into the fill, that is the component's gesture
- the 3px offset on the focus ring: pressed against the border it reads as a thicker frame
- the darkening on :active — press feedback beyond hover
## 6. You may change
- the label
- the contour weight through the emphasis prop
- the accent colour through the accent prop
- any native button props: onClick, type, form, disabled
- outer spacing and width through className
## 7. Rules
- Do not make an outlined button the main action on screen: its weight is calibrated to sit next to a filled one.
- Do not drop the paper fill for the sake of transparency — the component stops working on coloured backgrounds.
- Do not set border-width directly: the weight lives in a variable, otherwise the mark falls out of step with the border.
- 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/button-034.jsonhttps://vibeui.ru/r/button-034.jsonКомпонент самодостаточен: один файл, без зависимостей, собственная палитра в локальных переменных --vibeui-button-034-*. Серверный компонент, корень — сам <button>, поэтому все нативные пропсы проходят насквозь. Толщина обводки вынесена в переменную --vibeui-button-034-line и переключается data-атрибутом emphasis: то же значение управляет и толщиной кольца в значке, поэтому линии не расходятся. Фокус вынесен наружу с отступом 3px — иначе обводка сливается с рамкой.
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 Button034Props = ComponentPropsWithoutRef<"button"> & {
/** Толщина обводки: волосяная, обычная или тяжёлая. */
emphasis?: "hairline" | "regular" | "heavy"
accent?: string
}
// Идея компонента: весь вес кнопки держит обводка, а не заливка. Внутри
// бумажный фон, поэтому кнопка читается на любой подложке; на наведении
// заливка и рамка меняются местами — контур становится пятном.
const STYLES = `
:where([data-vibeui-block="button-034"]){
--vibeui-button-034-paper:oklch(1 0 0);
--vibeui-button-034-accent:oklch(0.52 0.14 196);
--vibeui-button-034-accent-fg:oklch(0.99 0.01 196);
--vibeui-button-034-line:1.5px;
--vibeui-button-034-radius:0.5rem;
--vibeui-button-034-font:ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
[data-vibeui-block="button-034"]{
appearance:none;cursor:pointer;box-sizing:border-box;
display:inline-flex;align-items:center;gap:0.5rem;
height:2.5rem;padding:0 1rem;border-radius:var(--vibeui-button-034-radius);
border:var(--vibeui-button-034-line) solid var(--vibeui-button-034-accent);
background:var(--vibeui-button-034-paper);color:var(--vibeui-button-034-accent);
font-family:var(--vibeui-button-034-font);font-size:0.875rem;font-weight:600;line-height:1;
transition:background-color .16s ease,color .16s ease,border-color .16s ease;
}
[data-vibeui-block="button-034"][data-emphasis="hairline"]{--vibeui-button-034-line:1px;font-weight:550}
[data-vibeui-block="button-034"][data-emphasis="heavy"]{--vibeui-button-034-line:2.5px;font-weight:700;letter-spacing:0.01em}
[data-vibeui-block="button-034"]:hover:not(:disabled){
background:var(--vibeui-button-034-accent);color:var(--vibeui-button-034-accent-fg);
}
[data-vibeui-block="button-034"]:active:not(:disabled){
background:color-mix(in oklab,var(--vibeui-button-034-accent) 85%,black);
border-color:color-mix(in oklab,var(--vibeui-button-034-accent) 85%,black);
}
/* Обводка фокуса вынесена наружу с отступом: иначе она сливается с рамкой. */
[data-vibeui-block="button-034"]:focus-visible{
outline:2px solid var(--vibeui-button-034-accent);outline-offset:3px;
}
[data-vibeui-block="button-034"]:disabled{cursor:not-allowed;opacity:.45}
[data-vibeui-block="button-034"] [data-part="mark"]{
flex:none;width:0.6875rem;height:0.6875rem;box-sizing:border-box;
border:var(--vibeui-button-034-line) solid currentColor;border-radius:50%;
}
@media (prefers-reduced-motion:reduce){[data-vibeui-block="button-034"]{transition:none!important}}
`
/**
* Кнопка на обводке: бумажная внутри, контурная снаружи, на наведении
* заливается акцентом. Один файл, ноль зависимостей, собственная палитра.
*/
export function Button034({
emphasis = "regular",
accent,
type = "button",
className,
style,
children = "Подробнее о тарифах",
...props
}: Button034Props) {
const palette = {
...(accent ? { "--vibeui-button-034-accent": accent } : null),
...style,
} as CSSProperties
return (
<>
<style href="vibeui-button-034" precedence="medium">
{STYLES}
</style>
<button
{...props}
type={type}
data-vibeui-block="button-034"
data-emphasis={emphasis}
className={className}
style={palette}
>
<span data-part="mark" aria-hidden="true" />
{children}
</button>
</>
)
}