🏷️

Container: Aspect ratio

What does it do?

The height of the container is calculated with the screen height, so they won't maintain the designed aspect ratio, but is useful when you want a container to be relative to the screen. (ex: container height is 100% of the screen in the design, it will appear 100% on any device screen)

image

How does it adjust your design to fit to any phone?

Bravo renders components considering their dimensions in reference to the specific device dimensions. In other words, it uses percentages to adapt to each screen.

💡

If the design is not fitting the screen as intended, add a splash screen in your Figma. The splash screen acts as a "default" size for Bravo to calculate the ratio of the other app pages.

The Tag

[aspectratio:screen]

Which layer can I put it on?

A second-level container

How do I set it up in the design tool?

  1. Create your design on the default app page size.
  2. image

  3. Add a container around the design.
  4. image

  5. Paste the tag into the layer name of the 2nd-level container.
  6. image

  7. Import to Bravo Studio & preview on Bravo Vision 🚀 (If you imported the app before, you just need to press the button Update in Bravo Studio to see the changes)

💾 Resources

👉 Sample Figma file

Happy Bravorizing! 🥳