Skip to content

DocsActionsButton

PT

Actions

Button

Primary in ink, outlined secondary, ghost, accent and icon-only, in three sizes.

CSS only

Example

Installation

Button ships in the full package, in unslop.css:

curl -fsSL unslop.leallabs.dev/i | sh

No build It's just CSS: with unslop.css on the page, the classes already work.

Sizes

Small is 32px tall, medium 40px and large 48px. For a standalone control on mobile, prefer large.

Icon only

Square, with the same height as the chosen size. With no visible text, aria-label is required.

Classes and variants

ClassWhat it does
u-btnBase: 40px tall, tile background and a light outline.
u-btn--primaryMain action, in ink. Doesn't change with the accent.
u-btn--secondaryOutline, transparent background.
u-btn--ghostNo background or outline, secondary text.
u-btn--accentBackground in the current accent.
u-btn--sm32px tall.
u-btn--lg48px tall.
u-btn--iconSquare, icon only.

Accessibility and keyboard

State and roles

WhereAttributeWhat it says
disablednative attributeFades it and blocks the pointer.
aria-disabled="true"on the button or linkSame look as disabled, without removing it from focus.
aria-labelon u-btn--iconThe button's name when there's no text.

Keyboard

KeyDoes
Tabfocuses the button
Enter or Spaceactivates it (native button)

Type to search. Arrows pick, Enter opens.