Comments (9)
I had to remove the css imports as they contain css resets that interfere with Chakra UI it seems.
from saas-ui.
That makes sense! Thank you!
from saas-ui.
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.
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.
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.
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.
@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:
Notes:
- In both the repos the AppShell is commented out and at the bottom of the index.tsx (or index.js) file.
- I've also added the NextJS 12 example to Github.
from saas-ui.
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.
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)
- [SUI-99] Using left positioned drawer with modal manager causes flashing when closing. HOT 1
- Horizontal Layout for Radio Button HOT 1
- [@saas-ui/theme-glass] Uncaught ReferenceError: process is not defined with Remix HOT 5
- Ability to provide custom Link component HOT 2
- White background color Card in darkmode HOT 3
- Filter examples don't render HOT 2
- `label` for `confirmProps` is ignored HOT 3
- Cannot configure noOfLines on ListItemLabel HOT 1
- Switch field does not respond to default values HOT 1
- FormDialog: Type instantiation is excessively deep and possibly infinite.ts (2589) HOT 8
- `useSnackbar` is typed to returns an optional unnecessarily HOT 1
- Hidden menu dropdown of SelectField is causing a scrollbar to appear on smaller devices HOT 2
- Absolute card action positioning is causing text wrap issues on mobile HOT 1
- `Select` menu dropdown cannot be wrapped in `Portal` HOT 2
- Vite 4.3 uses typescript 5 and breaks type imports HOT 5
- setting`colorScheme` on `<FormStepper>` works but throws an error. HOT 2
- BackgroundGradientRadial and BackgroundGradient rendering issue on Safari HOT 1
- Unable to use Form in Remix.run HOT 3
- Remix.run log in confirmation page shows undefined HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from saas-ui.