Expander
Notes
Expander
animates the height of its children to an expanded
or collapsed state based on the value of the isExpanded
prop.
There are two effects for showing/hiding content as the Expander animates, which are passed as props:
reveal
(default) -> Content is revealed top-down (ie. top is seen first)pushdown
-> Content is pushed down into view (ie. bottom is seen first)
Note: The SimpleExpander
(see below) builds on top of Expander
;
it provides out of the box logic for toggling the expanded state and handles
accessibility concerns.
Props
- children
node
- expandEffect
oneOf('reveal', 'pushdown')
['reveal']
How the content appears as the expander animates open
- isExpanded
bool
[false]