Skip to content
Alea0.1
Pro
  1. Alea
  2. Components
  3. Effects
  4. Gooey

EffectsAlea Pro

Gooey

Shapes that merge like liquid: a pill switcher whose selection flows to the next item, a button whose actions drip out of it, and the filter for your own shapes.

import { GooeyNav, GooeyMenu, Gooey } from '@alea/pro';

Examples

Tokens

The design tokens this component reads, with their value in the current theme. Override any of them to restyle it.

Color

  • --alea-border…
  • --alea-chip-bg…
  • --alea-chip-text…
  • --alea-focus…
  • --alea-surface-deep…
  • --alea-text…
  • --alea-text-muted…

Space

  • --alea-space-4…

Type

  • --alea-font-size-md…
  • --alea-font-weight-medium…

Motion

  • --alea-motion-duration-fast…
  • --alea-motion-duration-slow…
  • --alea-motion-duration-slower…
  • --alea-motion-ease-emphasized…
  • --alea-motion-ease-out…

Props

GooeyNav props

A pill switcher whose selection flows to the next item like a drop of liquid (a radio group underneath).

PropTypeDefaultDescription
aria-labelrequiredstring-
itemsrequired{ id: Key; label: ReactNode; }[]-
classNamestring-
defaultValueKey-
onChange((id: Key) => void)-
valueKey-

GooeyMenu props

A round button whose actions drip out of it like liquid (the gooey plus menu). Escape closes and returns focus.

PropTypeDefaultDescription
actionsrequired{ id: Key; icon: ReactNode; label: string; onAction: () => void; }[]-The actions: an icon, a label (used as the accessible name) and what it does.
classNamestring-
direction"left" | "right" | "up" | "down"'up'Direction the actions come out. Default up.
labelstring-Name of the button that opens it. Default "More actions".

Gooey props

Wraps shapes so they merge like liquid when they touch. Put only shapes inside; keep text in a layer above.

PropTypeDefaultDescription
asElementType'div'
classNamestring-
strengthnumber10
styleCSSProperties-

Specs

Generated from the source: the variants in the types, the states and tokens in the CSS, and the motion patterns that apply. The grids render the real component in both themes; the numbers are measured from the page.

GooeyNav

States
HoverSelectedKeyboard focus
Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-gooey-nav.alea-gooey-nav-blobs.alea-gooey-nav-blob.alea-gooey-nav-items.alea-gooey-nav-item
Data attributes
data-trail

GooeyMenu

Variants
directionleftrightupdown
States
Open
Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-gooey-menu.alea-gooey-menu-blobs.alea-gooey-menu-blob.alea-gooey-menu-actions.alea-gooey-menu-action.alea-gooey-menu-main
Data attributes
data-main

Gooey

Dark and light
Every color comes from theme tokens, so it follows data-theme (and presets like Graphite) on the page or any wrapper. Contrast is checked in both themes.
Styling hooks
.alea-gooey

Accessibility

  • GooeyNav is a radio group: arrows move the selection, the blobs are decoration hidden from screen readers.
  • GooeyMenu's button says whether it is expanded; each action has a name; Escape closes it and returns focus.
  • Text stays outside the filter, so it is always sharp.

Keyboard

KeyDoes
Arrow keysGooeyNav: move the selection
Enter or SpaceGooeyMenu: open, close or run an action
EscapeGooeyMenu: close and return focus

Do and don't

Do

  • Use it where the merge explains something: a selection moving, actions coming out of one button.

Don't

  • Don't put text or icons inside Gooey; the filter blurs them.
Tested with axe, keyboard and screen reader roles