All styles
Outline & Ghost

Border Draw CSS Button

Free43 lines · no JS
Open in Studio
Theme

A real <button> carrying .btn-border-draw — the preview is the stylesheet, not a picture of it.

States
default
hover
focus-visible
active
not declared
disabled
not declared
.btn-border-draw {
  position: relative;
  display: inline-block;
  padding: 13px 28px;
  border: none;
  background: transparent;
  color: #e2e8f0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}
.btn-border-draw::before,
.btn-border-draw::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
}
.btn-border-draw::before {
  top: 0;
  left: 0;
  border-top: 2px solid #f472b6;
  border-right: 2px solid transparent;
  transition: width 0.25s ease 0.25s, height 0.25s ease, border-color 0s ease 0.25s;
}
.btn-border-draw::after {
  bottom: 0;
  right: 0;
  border-bottom: 2px solid #f472b6;
  border-left: 2px solid transparent;
  transition: width 0.25s ease 0.25s, height 0.25s ease, border-color 0s ease 0.25s;
}
.btn-border-draw:hover::before,
.btn-border-draw:hover::after {
  width: 100%;
  height: 100%;
  border-color: #f472b6;
}
.btn-border-draw:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
Self-contained · MIT · no build step.btn-border-draw
Outline & GhostSquareBorder FX

Implementation notes

About the Border Draw CSS button

Border Draw uses a lightweight treatment that keeps secondary actions visible. Its square geometry creates a compact, precise control. The border fx details are included in the copy-paste CSS.

Usage

<button class="btn-border-draw">Button</button>

Pair it with the CSS tab above — the class is self-contained.

Before shipping: keep the semantic button element, verify contrast on your actual background and add a visible:focus-visible state. If you retain motion, include a prefers-reduced-motion override.
Built with
HTML + plain CSS
Shape
Square
Exports
CSS, Tailwind, React
License
MIT · commercial use
Complete the look

Build the interface around this button

We matched its palette, surface, geometry and motion to a complete UI system — like composing an outfit, not browsing unrelated parts.

Style DNA · v1
How matching works →
Pro preview
Modal75% match

Midnight System Decision Modal

Midnight System kit

blue paletteDark UI character
Unlock with Pro →
Free sample
Input75% match

Midnight System Smart Input

Midnight System kit

blue paletteDark UI character
Pro preview
Toggle75% match

Midnight System Preference Toggle

Midnight System kit

blue paletteDark UI character
Unlock with Pro →
Pro preview
Card75% match

Midnight System Feature Card

Midnight System kit

blue paletteDark UI character
Unlock with Pro →
Pro preview
Dropdown75% match

Midnight System Action Menu

Midnight System kit

blue paletteDark UI character
Unlock with Pro →
Pro preview
Form75% match

Midnight System Signup Form

Midnight System kit

blue paletteDark UI character
Unlock with Pro →
Get the complete Midnight System kit
Six coordinated component types, commercial license and future kit updates.
Explore Pro · $39

More styles that match

Bracket Hint

Corner Frame

Underline Slide

Blueprint Trace

Dashed Craft

Double Frame

Two optional extras load only if you allow them. Every button, preview and line of code works exactly the same either way. What each one does