AhaSlides Design
v0.52.0React · Vue · Lit

Components · Layout

Space

An even, DS-scale gap between a small inline set of items — buttons, tags, inline controls.

Examples

Direction
Size
Align
Horizontal · size middle (the probe — the playground drives its attributes live)
Sizes · small · middle · large
ABC ABC ABC
Split · a thin rule between items
Edit Duplicate Delete
Vertical stack · size small
Line one
Line two
Line three

API

PropTypeDefaultNotes
sizesmall | middle | large | numbersmallGap between items — named DS step (8/16/24) or a raw pixel number
directionhorizontal | verticalhorizontalLay items in a row or stack them
alignstart | center | end | baselinecenterCross-axis alignment (align-items)
wrapbooleanfalseAllow items to wrap onto multiple lines
splitbooleanfalseRule a thin --aha-split divider between adjacent items

Install

# .npmrc — once: point the @ahaslides-product scope at GitHub Packages
@ahaslides-product:registry=https://npm.pkg.github.com
//npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}   # a GitHub token with read:packages

npm i @ahaslides-product/design
import '@ahaslides-product/design/tokens.css';   // once, at the app root
import '@ahaslides-product/design/aha-space';   // registers <aha-space>

Agent feed for this component (absolute, fetchable anywhere): space.agent.json · space.md · space.llms.txt

When to use

When to use
  • Space — spacing a small inline set of items evenly — buttons in a toolbar, tags in a row
  • Flex — you need alignment/justification control over a block-level layout
  • Grid — the items belong in two-dimensional rows and columns
Space is the lightweight spacer — no alignment gymnastics, just a consistent gap. Keep sizes on the named scale so inline spacing matches across surfaces. It is layout, never decoration: it paints no background.
Surfaces
editor dashboard settings audience

Spec

Display inline-flex (row) · flex (vertical) · Size scale small 8 · middle 16 · large 24 (or a raw px number) · Default size small (8), row, items centred · Align start · center · end · baseline (align-items) · Wrap off by default; on lets a row flow onto multiple lines · Split 1px --aha-split #F1F1F1 rule between adjacent items (half-gap inset)