Skip to content

hideToast() ​

Hides the currently visible toast.

Type ​

ts
export const hideToast: () => void

Parameters ​

None.

Example ​

ts
import { showToast, hideToast } from '@/uni_modules/unix-utils'

showToast({ title: '正在处理…', icon: 'loading', duration: 0 })
// Hide it manually once your work is done
hideToast()

Per-Platform Behavior ​

PlatformBehavior
App direct-attach channelRemoves the attached view proactively and hides reliably
Web self-drawn channelThe DOM singleton fades out, then the mask resets; hides reliably
WeChat / HarmonyOS native channelsBest effort (passes uni.hideToast() through)

For the native uni.showToast, position-style toasts are officially not supported for hiding; unix-utils removes this limitation on the self-drawn channel, so position-style toasts can also be hidden reliably.

Released under the MIT License.