19/Actions and labels
Buttons
Four main variants, three sizes, icons, and disabled and loading states.
Variants
HTML
<button class="cb-btn cb-btn--primary" type="button">Primario ↗</button>
<button class="cb-btn cb-btn--outline" type="button">Outline</button>
<button class="cb-btn cb-btn--ghost" type="button">Ghost</button>
<button class="cb-btn cb-btn--soft" type="button">Soft</button>
<button class="cb-btn cb-btn--danger" type="button">Eliminar</button>
<a class="cb-btn cb-btn--link" href="#">Enlace</a>
Sizes
HTML
<button class="cb-btn cb-btn--primary cb-btn--sm" type="button">Pequeño</button>
<button class="cb-btn cb-btn--primary" type="button">Mediano</button>
<button class="cb-btn cb-btn--primary cb-btn--lg" type="button">Grande</button>
With icon
HTML
<button class="cb-btn cb-btn--primary" type="button"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M12 5v14M5 12h14"/></svg>Nuevo</button>
<button class="cb-btn cb-btn--outline" type="button">Descargar<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M12 4v12m0 0-5-5m5 5 5-5M4 20h16"/></svg></button>
<button class="cb-btn cb-btn--outline cb-btn--icon" type="button" aria-label="Más opciones"><svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true"><circle cx="5" cy="12" r="1.6"/><circle cx="12" cy="12" r="1.6"/><circle cx="19" cy="12" r="1.6"/></svg></button>
<button class="cb-icon-btn" type="button" aria-label="Editar"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><path d="M4 20h4L19 9l-4-4L4 16z"/></svg></button>
Disabled and loading
For a disabled link use aria-disabled="true". The loading state keeps the width and shows a spinner; use aria-busy="true" or the is-loading class.
HTML
<button class="cb-btn cb-btn--primary" type="button" disabled>Deshabilitado</button>
<a class="cb-btn cb-btn--outline" aria-disabled="true">Enlace inactivo</a>
<button class="cb-btn cb-btn--primary" type="button" aria-busy="true"><span>Guardando</span></button>
<button class="cb-btn cb-btn--outline" type="button" aria-busy="true"><span>Cargando</span></button>
Action group
cb-actions spaces the buttons apart and stretches them to full width on mobile.
HTML
<div class="cb-actions mt-0">
<a href="#" class="cb-btn cb-btn--primary">Cotizar ↗</a>
<a href="#" class="cb-btn cb-btn--outline">Ver servicios</a>
</div>
Classes and modifiers
| Class | Description |
|---|---|
.cb-btn | Base: 38px tall, 13px, semibold. |
.cb-btn--primary | Accent fill with --cb-accent-bg and --cb-accent-ink text. |
.cb-btn--outline | Thin border (the "ghost" of the original design). |
.cb-btn--ghost | No border, background only on hover. |
.cb-btn--soft | Soft accent background. |
.cb-btn--danger | Destructive action. |
.cb-btn--link | Looks like an underlined link. |
.cb-btn--sm, .cb-btn--lg | 30px and 44px sizes. |
.cb-btn--icon | Square icon-only button. |
.cb-btn--block | Full width. |
.is-loading | Loading state (equivalent to aria-busy="true"). |
.cb-icon-btn | 36px icon button with a border. |
.cb-actions | Row of buttons; --center centers them. |
Accessibility
- Icon-only buttons need
aria-label. - Use
buttonfor actions andafor navigation. aria-busy="true"signals that the action is in progress.- The visible focus ring uses the accent color with a 2px outline.