# react-icalendar-link

> Ability to create link for downloading ics file

Latest version **3.0.2** (published 2021-11-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install react-icalendar-link
pnpm add react-icalendar-link
yarn add react-icalendar-link
bun add react-icalendar-link
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.2 |
| Published | 2021-11-06 |
| First published | 2018-10-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=8 |
| Dependencies | 1 |
| Unpacked size | 59.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 40 |
| Author | josephj |
| Maintainers | josephj |

## Links

- npm: https://www.npmjs.com/package/react-icalendar-link
- Repository: https://github.com/josephj/react-icalendar-link
- Homepage: https://github.com/josephj/react-icalendar-link#readme
- Issues: https://github.com/josephj/react-icalendar-link/issues
- npm.io page: https://npm.io/package/react-icalendar-link

## Dependencies (1)

- [@jest/globals](https://npm.io/package/@jest/globals.md) ^27.0.1

## Recent versions

- 3.0.2 (latest) — 2021-11-06
- 3.0.1 — 2021-05-24
- 3.0.0 — 2021-05-08
- 2.0.2 — 2021-05-08
- 2.0.1 — 2021-05-07
- 2.0.0 — 2021-01-31
- 1.0.3 — 2018-10-07
- 1.0.2 — 2018-10-05
- 1.0.1 — 2018-10-05
- 1.0.0 — 2018-10-05

## README

# react-icalendar-link

> Ability to create link for downloading ics file

[![NPM](https://img.shields.io/npm/v/react-icalendar-link.svg)](https://www.npmjs.com/package/react-icalendar-link) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)

## Install

```bash
npm install --save react-icalendar-link
```

## Usage

```jsx
import React from "react";
import ICalendarLink from "react-icalendar-link";

class App extends React.Component {
  render() {
    const event = {
      title: "My Title",
      description: "My Description",
      startTime: "2018-10-07T10:30:00+10:00",
      endTime: "2018-10-07T12:00:00+10:00",
      location: "10 Carlotta St, Artarmon NSW 2064, Australia",
      attendees: [
        "Hello World <hello@world.com>",
        "Hey <hey@test.com>",
      ]
    }
    return (
      <ICalendarLink event={event}>
        Add to Calendar
      </ICalendarLink>;
    );
  }
}
```

### Using Raw Content

Currently it provides very few fields. You can provide the raw content for the extra fields instead.

```jsx
import React from "react";
import ICalendarLink from "react-icalendar-link";

class App extends React.Component {
  render() {
    const event = {
      title: "My Title",
      description: "My Description",
      startTime: "2018-10-07T10:30:00+10:00",
      location: "10 Carlotta St, Artarmon NSW 2064, Australia";
    }
    const rawContent = `ATTENDEE;CN="Cyrus Daboo";CUTYPE=INDIVIDUAL;PARTSTAT=ACCEPTED:mailto:cyrus@example.com
ATTENDEE;CN="Wilfredo Sanchez Vega";CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:wilfredo@example.com
ATTENDEE;CN="Bernard Desruisseaux";CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION;ROLE=REQ-PARTICIPANT;RSVP=TRUE:mailto:bernard@example.net
ATTENDEE;CN="Mike Douglass";CUTYPE=INDIVIDUAL;PARTSTAT=NEEDS-ACTION;RSVP=TRUE:mailto:mike@example.org`;

    return (
      <ICalendarLink event={event} rawContent={rawContent}>
        Add to Calendar
      </ICalendarLink>;
    );
  }
}
```

## License

MIT © [josephj](https://github.com/josephj)

---
_Source: https://npm.io/package/react-icalendar-link · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
