Add code samples for Layout API reference