It sounds like you're experiencing an issue where the Shadcn component is not rendering as expected in your Vue + Jetstream + Inertia setup. Here are a few steps you can take to troubleshoot and potentially resolve the issue:
-
Check Component Import Path: Ensure that the import path for the
Buttoncomponent is correct. Double-check the path and make sure it matches the directory structure in your project.import { Button } from '@/Components/ui/button'; -
Verify Component Registration: Make sure that the
Buttoncomponent is properly registered if you're using it locally within theDashboard.vuefile. If it's a global component, ensure it's registered globally in your Vue instance. -
Inspect CSS and Styles: Since the component is showing up in the DOM but is greyed out, it might be a CSS issue. Check if there are any CSS rules that might be affecting the visibility of the component, such as
display: noneorvisibility: hidden.Use your browser's developer tools to inspect the element and see what styles are being applied. Look for any inherited styles that might be causing the issue.
-
Tailwind Configuration: Since you mentioned that the
tailwind.config.jswas overwritten, ensure that the necessary configurations for Shadcn components are included. Compare the configurations and make sure any required plugins or settings are present. -
Check for JavaScript Errors: Even though you mentioned there are no console errors, double-check for any warnings or errors that might not be immediately obvious. Sometimes, issues in other parts of the application can affect component rendering.
-
SSR Considerations: Since you're using SSR, ensure that the component is compatible with server-side rendering. Some components might have issues when rendered on the server.
-
Rebuild Assets: After making changes, ensure you rebuild your assets. Run the following commands to clear any cached files and rebuild:
npm run dev -
Test with a Simple Component: As a sanity check, try rendering a simple component or even plain HTML in the same place to ensure that the issue is specific to the Shadcn component and not a broader rendering issue.
If none of these steps resolve the issue, consider reaching out to the Shadcn community or checking their documentation for any known issues or additional setup steps that might be required.