useDevice Hook
Diego Muralles avatar
Written by Diego Muralles
Updated over a week ago

Vev projects can be custom-designed for various presentation modes such as desktop, tablet, or mobile. useDevice() returns the currently active mode ('desktop' | 'tablet' | 'mobile').


const device: string = useDevice();


import ( useDevice ) from 'vev;
export default function () {
const device:'desktop'|'tablet'|'mobile' = useDevice();
return <h1> Device: {device} </h1>
Did this answer your question?