1. Reference
  2. Navigation

<portal>

A live window onto another page: blurred and dimmed under a glass rim, it opens to full screen on a tap.

Navigation
portal.ham
<portal id="myapps"
        src="myapps.ham"
        label="My Apps"
        close="top-left"
        effect="ripple zoom"
        rim="12"
        style="w-full h-220 rounded-3xl blur-12 dim-20"/>
No picture: the live page it opens isn't drawn in a still yet.

Attributes

NameWhat it doesDefault
close Draw the standard close button there when open (back and #id.close always work).
top-left, top-right
close-duration Closing time in ms (default ~0.65 of duration).
number
close-ripple-amplitude Closing waves: displacement px (default: ripple-amplitude).
number
close-ripple-gap Closing waves: ms apart (default: ripple-gap).
number
close-ripple-life Closing waves: seconds on screen (default: ripple-life).
number
close-ripple-speed Closing waves: px/s (default: ripple-speed).
number
close-ripple-width Closing waves: wavelength px (default: ripple-width).
number
close-ripples Waves when it closes (default: ripples). They start where the close came from: the close button, the swiped edge, else the window.
number
closed-scale The page's scale inside the closed window, about its center (0.85: drawn smaller, so opening zooms in as it unblurs). It grows to 1 on the same curve as the unblur, carrying on from the press dip; closing shrinks it back. 1 = as is.
number
1
duration Opening time in ms.
number
1600
effect What plays as it opens and closes, any of: ripple (waves across the screen from the tap, set by ripples / ripple-*), zoom (the page swells and settles, effect-zoom), none. Several combine: effect="ripple zoom". Color filters (grayscale, brightness-N …) in its style fade out as it opens.
string
ripple
effect-zoom With effect="zoom": how far the page swells mid-motion.
number
1.15
label Accessible name of the closed portal (not drawn).
string
Open
press-overshoot With press:scale-N in the style (the window sinks while pressed and opens from the dip): how far the spring out of the dip overshoots; 0 = none.
number
1.7
rim Width in px of the glass rim along the inside of the window edge: the page under it magnified, as through the thick edge of a lens. 0 = no rim. It thins away as the portal opens.
number
10
rim-blur The rim band's own blur in px (default: the window's blur-N). It fades with the rim as the portal opens.
number
rim-color Highlight line on the rim's outer edge.
color
#FFFFFF8C
rim-dim The rim band's own black veil in % (default: the window's dim-N). It fades with the rim as the portal opens.
number
rim-inner-color Highlight line on the rim's inner edge.
color
#FFFFFF47
rim-zoom How much the rim magnifies the page across the band, like the curved edge of a lens; it meets the center with no step. 1 = no magnification.
number
1.35
ripple-amplitude
also ripple-size
How far each wave displaces the screen, px.
number
60
ripple-gap Milliseconds between the waves.
number
200
ripple-life Seconds each wave stays on screen.
number
1.4
ripple-speed Wave speed in px/s.
number
170
ripple-width Wavelength in px.
number
180
ripples Waves across the whole screen from the tap point when it opens; 0 = none. No tap_effect needed.
number
3
src The page to show: a fragment, like a navigate: page (a full <app> is refused).
url

Commands

NameWhat it does
close Shrink back into the box, keeping the page as it is.
open Expand to the screen and make it usable; \$id.open turns true.
toggle Open or close.

Readings

NameWhat it does
open Whether it fills the screen.

Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.

This page is also Markdown, and all of HAM is in llms.txt.