motion/grow
import { … } from 'zidane-ui'ui/src/motion/grow.tsx
Components#
GrowComponent#
A block that grows in from nothing and shrinks out (.zg-grow): a CSS
grid-rows transition the style engine runs every frame, whatever React is
busy with, and whose open row follows its content as it streams. Nothing
is measured: a height animation from auto collapses its target for a
layout to read the end state, which clamps the transcript's scroll and
jumps the view (the x axis does the same with columns, for a tile in a
row). With appear off (rendered with its list): already open.
Leaving (AnimatePresence): it collapses (exit / fade-out), then goes
after readExitMs() (at once with motion off).
function Grow(props: GrowProps): ElementParameters
| Name | Type | Description |
|---|---|---|
| props | GrowProps | Component props. |
Returns
ElementProps
| Name | Type | Default | Description |
|---|---|---|---|
| appear | boolean | Grow in when mounted. When | |
| as? | 'div' | 'li' | 'div' | Element to render. Use |
| axis? | 'x' | 'y' | 'y' | The direction it grows in. |
| children | ReactNode | The block's content. | |
| className? | string | Extra classes on the element. | |
| data-earlier? | string | Passed to the element as | |
| style? | CSSProperties | Inline styles on the element. |
Interfaces#
GrowPropsInterface#
Props for Grow.
interface GrowPropsProperties
| Name | Type | Default | Description |
|---|---|---|---|
| appear | boolean | Grow in when mounted. When | |
| as? | 'div' | 'li' | 'div' | Element to render. Use |
| axis? | 'x' | 'y' | 'y' | The direction it grows in. |
| children | ReactNode | The block's content. | |
| className? | string | Extra classes on the element. | |
| data-earlier? | string | Passed to the element as | |
| style? | CSSProperties | Inline styles on the element. |
Re-exports#
These names are documented on the entry point that owns them.
- GrowPresence