@orangecheck/design / useOcMotion
Function: useOcMotion()
function useOcMotion(): {
motion: OcMotion;
setMotion: (value: OcMotion) => void;
};
Defined in: tokens/provider.tsx:278
Read the ambient-motion switch + setter. The WCAG 2.2.2 pause mechanism:
'off' sets data-oc-motion="off" on <html> (persisted family-wide in the
oc_motion cookie), which pauses the aurora and any .oc-ambient element.
Throws if used outside OcThemeProvider.
Returns
{
motion: OcMotion;
setMotion: (value: OcMotion) => void;
}
| Name | Type | Defined in |
|---|---|---|
motion | OcMotion | tokens/provider.tsx:278 |
setMotion() | (value: OcMotion) => void | tokens/provider.tsx:278 |