Adding an image best practices #2326
-
I'm building a UI with an error state use case where an image is positioned to the left of Header, Paragraph, and Button Paste components. Would it be best to use the Media Object component to wrap these items or should I use a Box as an image or a primitive image tag for the image? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Hi @eshanholtz! This is a great use case for Media Object. It helps with laying out images inline with other items, there's more info on the docs page: https://paste.twilio.design/components/media-object#about-media-object. Here is an example of how you could build the UI: https://codesandbox.io/s/angry-wiles-ymgvj7?file=/src/App.tsx Please let me know if you have more questions. |
Beta Was this translation helpful? Give feedback.
-
Thank you! |
Beta Was this translation helpful? Give feedback.
Hi @eshanholtz! This is a great use case for Media Object. It helps with laying out images inline with other items, there's more info on the docs page: https://paste.twilio.design/components/media-object#about-media-object.
Here is an example of how you could build the UI: https://codesandbox.io/s/angry-wiles-ymgvj7?file=/src/App.tsx
Please let me know if you have more questions.