Native only
Share
OS share sheet · copies to the clipboard on web
function ShareDemo() { const { share } = useShare(); // The link that actually opens this prototype, wherever it is running. const url = Linking.createURL('/'); return ( <View className="w-full gap-3"> <Button onPress={() => void share({ title: 'Halftone', message: 'Take a look at this prototype', url })}> <Text>Share this prototype</Text> </Button> <Text className="text-muted-foreground text-sm" numberOfLines={2}> {url} </Text> </View> );}Usage
A hook, not a component — the trigger is an ordinary Button. Copies to the clipboard when the OS sheet is unavailable.
API
const { share } = useShare(); share({ message?, url?, title? })Get it
Already in every copy of the native kit:
import { useShare } from '@/components/kit/share';Details
- Exports
useShare- Packages
- expo-clipboard@~57.0.2
- Installs with
- @halftone-native/lib-haptics, @halftone-native/toast
- Also searched as
- share sheet, send, export, copy link
- Registry JSON
- /r/native/share.json
Agents: the whole registry is at /llms.txt.