Return shape of useTheme. toggle is a two-way switch: it leaves system for the opposite of what is showing.
toggle
system
const { mode, resolved } = useTheme()mode === 'system' ? `Auto (${resolved})` : mode // 'Auto (dark)' vs 'light' Copy
const { mode, resolved } = useTheme()mode === 'system' ? `Auto (${resolved})` : mode // 'Auto (dark)' vs 'light'
Return shape of useTheme.
toggleis a two-way switch: it leavessystemfor the opposite of what is showing.Example