ShareButtonProps
Interface: ShareButtonProps
Properties
onShare()?
optionalonShare: (result) =>void
Called when the share action completes. Receives the share URL on success, or an Error on failure. Use this to show toast notifications or track analytics.
Parameters
result
{ url: string; } | { error: Error; }
Returns
void
buildShareUrl()?
optionalbuildShareUrl: (threadId) =>string
Custom URL builder. By default, appends ?threadId={id} to current URL.
Return the full share URL.
Parameters
threadId
string
Returns
string
variant?
optionalvariant:"default"|"outline"|"ghost"
Button variant
Default
"ghost"size?
optionalsize:"default"|"icon"|"sm"|"lg"
Button size
Default
"sm"className?
optionalclassName:string
Additional CSS classes
children?
optionalchildren:ReactNode
Custom button content. If not provided, shows icon + “Share chat”
Last updated on