Docs
Share
Share
Interface for sharing content.
Installation
Usage
import { Share } from "@/components/ui/share";<Share>{/* Example usage */}</Share>Props
| Prop | Type | Default | Description |
|---|---|---|---|
className | string | - | The class name to apply to the component. |
children | ReactNode | <Icon /> | The content to display in the component. |
value | string | window.location.href | The URL or content to share. |
valuePrefix | string | - | Prefix text to add before the value when sharing. |
displayValue | string | - | Title to use when sharing (for native share API). |
description | string | "Copied and ready to share" | Toast message shown after copying. |
asChild | boolean | false | Whether to merge props onto the immediate child element. |
onShare | () => void | - | Callback function invoked when sharing is triggered. |