Usage

Share a message or file

This type is used by share

tsx
import { share } from 'kuito';

const result = await share(
  { message: 'Severance', url: 'https://www.tvmaze.com/shows/44933', title: 'A show' },
  { dialogTitle: 'Share a show', subject: 'Watch this' },
);

if (result.action === 'shared') console.log('shared with', result.activityType);

Type declaration

ts
export type ShareOptions = {
  /** Android: the chooser's title. */
  dialogTitle?: string;
  /** iOS: the subject, as an email's. */
  subject?: string;
  /** iOS: activity types to leave out, as `com.apple.UIKit.activity.AirDrop`. */
  excludedActivityTypes?: string[];
};

Members 3

NameTypeRequiredDescription
dialogTitlestringNoAndroid: the chooser's title.
subjectstringNoiOS: the subject, as an email's.
excludedActivityTypesstring[]NoiOS: activity types to leave out, as com.apple.UIKit.activity.AirDrop.
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.