tsimport {useEntryAnimation} from '@astryxdesign/core/hooks'
| Guidance | Practices |
|---|---|
| Do | Use for conditionally rendered elements like validation messages, toasts, or expanding sections. |
| Do | Spread the returned style into stylex.props() alongside other styles. |
| Don't | Use for elements that should be visible on initial page load; they will not animate. |
| Param | Type | Description |
|---|---|---|
preset | 'slideDown' | 'slideUp' | 'fadeIn' | 'scaleIn' (default: 'slideDown') | Animation preset to apply on mount. |
| Field | Type | Description |
|---|---|---|
| entryStyle | StyleXStyles | null | A StyleX style object for the entry animation, or null if the element was rendered on initial page load (no animation needed). |