Orientation
Purpose
Configuration
pwa:
manifest:
enabled: true
orientation: "portrait" # or landscape, any, etc.Available Orientations
any (Default)
portrait
portrait-primary
landscape
landscape-primary
Use Cases by Application Type
Social Media App
Video Streaming App
Gaming App
E-book Reader
Dashboard App
Fitness Tracker
Complete Examples
Portrait-Only Application
Landscape-Only Application
Flexible Orientation Application
Platform Behavior
iOS (iPhone/iPad)
Android
Desktop/Laptop
Best Practices
1. Choose Based on Content
2. Consider User Context
3. Test on Real Devices
4. Provide Responsive Design Regardless
5. Don't Lock Unnecessarily
Advanced: Handling Orientation Changes
Accessibility Considerations
1. Don't Restrict User Choice
2. Provide Clear Feedback
3. Test with Screen Readers
Common Mistakes
1. Locking When Not Needed
2. Wrong Orientation for Content
3. Not Testing Both Orientations
4. Ignoring CSS Media Queries
Debugging Orientation
1. Check Manifest in DevTools
2. Test Orientation Lock
3. Simulate on Desktop
Related Properties
Summary
Last updated
Was this helpful?