Can't download the correct version of a component #1457
-
|
Hey, When I run But when I run it on a StackBlitz project with the same exact configuration, I get this component: I've tried configuring my project to get typescript components instead, but I get the same result. Can you please help me understand why am I seeing this discrepancy? Thanks! |
Beta Was this translation helpful? Give feedback.
Answered by
sadeghbarati
Oct 8, 2025
Replies: 1 comment 9 replies
-
|
The current website is for v3 registry files for v4 you should check v3 registry sonner
<script lang="ts" setup>
import type { ToasterProps } from "vue-sonner"
import { Toaster as Sonner } from "vue-sonner"
const props = defineProps<ToasterProps>()
</script>
<template>
<Sonner
class="toaster group"
v-bind="props"
:toast-options="{
classes: {
toast: 'group toast group-[.toaster]:bg-background group-[.toaster]:text-foreground group-[.toaster]:border-border group-[.toaster]:shadow-lg',
description: 'group-[.toast]:text-muted-foreground',
actionButton:
'group-[.toast]:bg-primary group-[.toast]:text-primary-foreground',
cancelButton:
'group-[.toast]:bg-muted group-[.toast]:text-muted-foreground',
},
}"
/>
</template>v4 registry sonner
<script lang="ts" setup>
import type { ToasterProps } from "vue-sonner"
import { Toaster as Sonner } from "vue-sonner"
const props = defineProps<ToasterProps>()
</script>
<template>
<Sonner
class="toaster group"
v-bind="props"
:style="{
'--normal-bg': 'var(--popover)',
'--normal-text': 'var(--popover-foreground)',
'--normal-border': 'var(--border)',
}"
/>
</template> |
Beta Was this translation helpful? Give feedback.
9 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


No keep it as-is -->
new-yorkshadcn-vue CLI
FALLBACK_STYLEisnew-york-v4based on the code
if there is no
styleincomponents.jsonfile, fallback tonew-york-v4if the style value is
new-yorkandtailwind['config']is empty, also fallback tonew-york-v4i…