Skip to content

feat: How can I use all shadcn/ui components with shadcn-docs (like toast)? #128

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task
luanhsd opened this issue Apr 14, 2025 · 2 comments
Open
1 task
Labels
✨ feature New feature or request

Comments

@luanhsd
Copy link

luanhsd commented Apr 14, 2025

Describe the feature

Hi! First of all, thanks for the awesome work on shadcn-docs. I’m using it in a Nuxt 3 project and I’d love to take full advantage of the components from shadcn/ui.

I tried to use the toast component from shadcn/ui inside a .md page (using a Vue component), but it didn’t show up. I also tried wrapping everything with a UiToastProvider (like you would do in a regular setup), but still had no success.

Is it currently possible to use all components from shadcn/ui — especially toast — inside shadcn-docs pages? If so, is there a recommended way to set it up?

Thanks in advance!

Additional information

  • Would you be willing to help implement this feature?
@luanhsd luanhsd added the ✨ feature New feature or request label Apr 14, 2025
@Ast3risk-ops
Copy link
Contributor

Ast3risk-ops commented Apr 18, 2025

I'd try adding elements like this, and then making new Nuxt components with them (follow the instructions on the component's page on https://shadcn-vue.com), then calling those components in your Vue or Markdown file.

@ZTL-UwU
Copy link
Owner

ZTL-UwU commented Apr 19, 2025

mdc files can only access global components. You can create a wrapper component in components/content/xxx.vue which uses shadcn-vue components (e.g. UiButton) and then use the wrapper component in your mdc file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ feature New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants