#How to add class to body in Solid Start

3 messages · Page 1 of 1 (latest)

wintry chasm
#

Probably a stupid beginners question, but I'm migrating my app from a Vite SPA to Solid Start and I have some tailwind classes on the body element but cannot find any examples anywhere of how to access the body element in Solid Start. I've looked through the docs, all the example in the repo, this discord and can't find anything. Below is my app.tsx

import { Router } from "@solidjs/router";
import { FileRoutes } from "@solidjs/start/router";
import { Suspense } from "solid-js";
import Nav from "~/components/Nav";
import "./app.css";
import { MetaProvider } from "@solidjs/meta";

export default function App() {
  return (
    <MetaProvider>
      <Router
        root={props => (
          <>
            <Nav />
            <Suspense>{props.children}</Suspense>
          </>
        )}
      >
        <FileRoutes />
      </Router>
    </MetaProvider>
  );
}
north sky
#

You can add them to entry-server file I believe

wintry chasm
#

Ah yes it is right there. I didn't even think to look in the server file. Thanks!