Skip to content

Text Divider

A copy-paste dividers component in pure HTML & CSS. Zero dependencies, framework-agnostic, MIT-licensed.

DividersHTMLCSSany framework

Copy into your project

HTML
<div class="nuda-textdiv" role="separator">
  <span class="nuda-textdiv__line"></span>
  <span class="nuda-textdiv__label">OR</span>
  <span class="nuda-textdiv__line"></span>
</div>
CSS
.nuda-textdiv {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 200px;
  color: #63636e;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .12em;
}

.nuda-textdiv__line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,.16),transparent);
}

.nuda-textdiv__label {
  padding: 0 4px;
}

How to use Text Divider

Paste the HTML where you need it and the CSS into a global stylesheet (or a <style> tag). Every class is prefixed nuda- so it never collides with Tailwind or your own styles. Tweak the CSS custom properties to match your design system.

Works in React, Vue, Svelte, Astro, Next.js, Nuxt, Laravel Blade, Django, Rails — or a single .html file. No npm install, no build step.

More dividers components

← Browse all NudaUI components