UI Helpers
ZhinNX includes small UI helpers so deadline projects do not need to rebuild basic feedback patterns.
toast()
js
toast('Saved')modal()
js
modal({
title: 'Details',
content: 'This modal is rendered by ZhinNX.'
})confirm()
js
const accepted = await confirm({
title: 'Reset data?',
content: 'This action cannot be undone.'
})
if (accepted) {
console.log('reset')
}sheet()
js
sheet({
title: 'Actions',
content: '<button @click="closeSheet">Close</button>'
})loading()
js
const stop = loading('Loading data')
await api.get('/api/items')
stop()cx()
cx() joins classes conditionally.
js
const className = cx('button', isActive && 'active')