"Oy, get your head out of your phone!"

With pedestrians increasingly glued to mobile screens and straying into roads and oncoming traffic, a Dutch town has launched a pilot project to help warn of impending danger.

Launched this week, the so-called "Light-line" scheme uses LED light strips embedded into a road crossing and linked to traffic lights to cast a red or green line across the pedestrian's path.

"People are increasingly distracted on their smartphones when they are out and about among traffic," said local councillor Kees Oskam from the small western town of Bodegraven.

"Greater attention is being paid to social media, games, What's App, and music, and so there is not so much attention on traffic," he said in a statement.

"We probably can't overturn this trend, so we might as well try to anticipate" problems.

The lights have been produced by Dutch firm HIG Traffic Systems, and if the pilot test proves a success the aim will be to roll them out in other Dutch towns. It could possibly also be used on the country's many cycle paths.

According to the Dutch Road Safety organization, a smartphone is involved in one in five bike accidents involving young people.