How to define a frontend depending on device

Hya,

how to define a different frontend layout depending on the device, i.e, am touchpad, a mobile, a desktop web browser?

Thx in advance!