Full Screen Component ReactJS

I am now working on the component, which needs to be the size of full screen. But I don't want to write external CSS for this component because it is part of a very big project, so this is a one single component, do you have any suggestions ? Thanks in advance!

SOLVED Using 100vh directly in the component

Upvotes: 0

Views: 923

Answers (1)

Ian Calaunan
Ian Calaunan

Reputation: 111

On your component you need to specify this:

<your-react-component width="100%" height="100%"></your-react-component>

make sure that your body is also was set this way

<body width="100%" height="100%"></body>

Upvotes: 1

Related Questions