Components: Shadcn UI
Badge
Understand the design system and contribute to it
Component preview
The live preview for UI components is handled by components/atoms/codedocs/ComponentPreview.tsx. Use it directly inside MDX whenever you want a playground-style embed. Provide componentProps to set default values and propOptions to surface toggle-able props next to the preview.
Preview
NewBetaOutlineCritical
Available props
Toggle to update the preview
Secondary variant
variant: "secondary"
Outline variant
variant: "outline"
Destructive variant
variant: "destructive"
Prop reference
Auto-generated from the component source
Badge
classNamevariantasChild= false
React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & { asChild?: boolean; }
Code