Components

Helpers

PhoenixPaper.Ripple, Elevation, Shape, and theming: the plumbing every visual component in this library is built on.

Ripple

The Material ripple effect (a circle that expands from the click point and fades out). Vanilla inline onclick, no JS hook/bundler. Click or tap any button on this site to see it.

ripple: true (default) vs. ripple: false

Options

ripple
the boolean prop on Button, Fab, ToggleButton, Switch, Checkbox, RadioGroup, and a linked ListItem: default true, except Checkbox/RadioGroup (default false; their own instant fill/border change already reads as feedback on a target that small); always off when paperize is false
PhoenixPaper.Ripple.on_click/1
returns the script, or nil when disabled (so the attribute is dropped entirely)
PhoenixPaper.Ripple.container_classes/1
the "relative overflow-hidden" the ripple needs to stay clipped

Elevation

PhoenixPaper.Elevation.class/1 maps a Material dp level (0-24, clamped) to a pp-elevation-N class backed by a two-layer box-shadow approximating Google's official table.

Scale

0dp
1dp
2dp
4dp
8dp
16dp
24dp

Options

Elevation.class(level)
returns the literal "pp-elevation-N" class name

Shape

PhoenixPaper.Shape.class/1,2 maps a token to a literal rounded-* class, optionally scoped to an edge (:top/:bottom) for shapes like the filled text field that only round two corners.

Scale

none
xs
sm
md
lg
xl
full

Options

Shape.class(token)
all four corners
Shape.class(token, :top | :bottom)
only those two corners

Theming

Colors are Tailwind v4 theme tokens backed by CSS custom properties, namespaced pp- so they never collide with daisyUI. Try the buttons below: no page reload, just flipping data-theme/data-pp-theme on the root html element.

Try it

This changes the whole page's theme, not just this section; use the toggle in the top-right corner to flip back to your system preference.

Options

data-theme="dark"
on any ancestor (the same attribute daisyUI/Phoenix 1.8's generated app.css already use)
data-pp-theme="teal"
opts into the bundled alternate palette
custom theme
override the --color-pp-* variables from your own stylesheet: no build step, no JS config
z7ealth 2026