I used other react components before, they mostly have their own Image component, but I can't find that in Material-UI?
Or is it done via CardMediaAPI? or simply use tags? Thanks!
Just add a closing tag to your Appbar element (remove the self closing tag) and put the image inside.
A Generic, extendible Carousel UI component for React using Material UI. It switches between given children using a smooth animation.
Material UI: the set of foundational MIT React components is now called MUI Core. Material UI: the Material Design components developed by MUI. Also, we ditched the hyphen! Material UI X: the set of advanced React components is now called MUI X.
Developed by Google in 2014, Material-UI is a general-purpose customizable component library to build React applications. The folks at Google designed Material-UI as an adaptable system of guidelines, components, and tools to make app building beautiful yet straightforward.
Another option (at least in v5) is to use the Box component and select the underlying html element to be img as given in the example below (copied from official docs for v5)
<Box
component="img"
sx={{
height: 233,
width: 350,
maxHeight: { xs: 233, md: 167 },
maxWidth: { xs: 350, md: 250 },
}}
alt="The house from the offer."
src="https://images.unsplash.com/photo-1512917774080-9991f1c4c750?auto=format&w=350&dpr=2"
/>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With