Coder Social home page Coder Social logo

Comments (9)

Pagebakers avatar Pagebakers commented on June 8, 2024 1

I had to remove the css imports as they contain css resets that interfere with Chakra UI it seems.

Code sandbox

from saas-ui.

DevGJGlobal avatar DevGJGlobal commented on June 8, 2024 1

That makes sense! Thank you!

from saas-ui.

Pagebakers avatar Pagebakers commented on June 8, 2024

Are you using the pages or app directory in Next.js 13? The app directory needs extra setup to make sure styles are working properly.

from saas-ui.

DevGJGlobal avatar DevGJGlobal commented on June 8, 2024

I am using only pages.

Edit: As mentioned I also created a separate project with just NextJS 12, and in that case the components showed, but they had no styles.

from saas-ui.

DevGJGlobal avatar DevGJGlobal commented on June 8, 2024

Has anyone had any luck looking at the repos I've shared. The error is quite easily reproducible on CodeSandbox and I've attached screenshots in the respective Readme's too.

from saas-ui.

Pagebakers avatar Pagebakers commented on June 8, 2024

I'm unable to access the code sandboxes.

Can you try the following code? add height="$100vh" to AppShell.

export default function Home() {
  return (
    <AppShell
      height="$100vh"
      navbar={
        <Box as="header" borderBottomWidth="1px" py="2" px="4">
        </Box>
      }
      sidebar={
        <Sidebar>
          <SidebarSection>
            <NavItem>Home</NavItem>
            <NavItem>Settings</NavItem>
          </SidebarSection>
        </Sidebar>
      }
    >
      <Box as="main" flex="1" py="2" px="4" overflowY="auto">
        Your application content
      </Box>
    </AppShell>
  )
}

from saas-ui.

DevGJGlobal avatar DevGJGlobal commented on June 8, 2024

@Pagebakers Thanks for following up!

I've updated the Codesandbox links - they should be accessible now.
You should be able to see screenshots describing the issue on both Codesandbox and the Github repos linked above.

Can you try the following code? add height="$100vh" to AppShell.

Yes that fixes the height but does not solve the issue of the default styles not being applied

Based on the documentation, I expect to see this:
image

But I see this:
image

Notes:

  1. In both the repos the AppShell is commented out and at the bottom of the index.tsx (or index.js) file.
  2. I've also added the NextJS 12 example to Github.

from saas-ui.

Pagebakers avatar Pagebakers commented on June 8, 2024

That looks about right! Note that your theme probably renders in light mode by default, instead of the darkmode on the docs.

You can read more about how to setup dark/light mode here:
https://chakra-ui.com/docs/styled-system/color-mode

from saas-ui.

DevGJGlobal avatar DevGJGlobal commented on June 8, 2024

I haven't had time to dig into the Chakra-UI color-mode yet, but do note this still doesn't solve the problem with NextJS 13 (which is what the linked repos and CodeSandbox are for), where the elements appear to have zero-size when using the AppShell template, and when using the default NextJS template, couple of the element/styles disappear (most of them are intact).

from saas-ui.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.