Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@fullcalendar/react

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fullcalendar/react

The official React Component for FullCalendar

  • 6.1.15
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
370K
decreased by-7.92%
Maintainers
1
Weekly downloads
 
Created

What is @fullcalendar/react?

@fullcalendar/react is a powerful and flexible calendar component for React applications. It allows developers to create interactive and customizable calendars with ease. The package supports a wide range of features including event management, date navigation, and various view options.

What are @fullcalendar/react's main functionalities?

Basic Calendar Setup

This code sets up a basic calendar using the dayGridPlugin to display a month view. It demonstrates how to import and use the FullCalendar component in a React application.

import React from 'react';
import FullCalendar from '@fullcalendar/react';
import dayGridPlugin from '@fullcalendar/daygrid';

function MyCalendar() {
  return (
    <FullCalendar
      plugins={[dayGridPlugin]}
      initialView="dayGridMonth"
    />
  );
}

export default MyCalendar;

Event Management

This code demonstrates how to manage events in the calendar. It shows how to pass an array of event objects to the FullCalendar component to display events on specific dates.

import React from 'react';
import FullCalendar from '@fullcalendar/react';
import dayGridPlugin from '@fullcalendar/daygrid';

function MyCalendar() {
  const events = [
    { title: 'Event 1', date: '2023-10-01' },
    { title: 'Event 2', date: '2023-10-02' }
  ];

  return (
    <FullCalendar
      plugins={[dayGridPlugin]}
      initialView="dayGridMonth"
      events={events}
    />
  );
}

export default MyCalendar;

Customizing Event Appearance

This code shows how to customize the appearance of events in the calendar. It uses the eventContent prop to render events with custom styles based on their properties.

import React from 'react';
import FullCalendar from '@fullcalendar/react';
import dayGridPlugin from '@fullcalendar/daygrid';

function MyCalendar() {
  const events = [
    { title: 'Event 1', date: '2023-10-01', color: 'red' },
    { title: 'Event 2', date: '2023-10-02', color: 'blue' }
  ];

  return (
    <FullCalendar
      plugins={[dayGridPlugin]}
      initialView="dayGridMonth"
      events={events}
      eventContent={(eventInfo) => (
        <div style={{ color: eventInfo.event.extendedProps.color }}>
          {eventInfo.event.title}
        </div>
      )}
    />
  );
}

export default MyCalendar;

Other packages similar to @fullcalendar/react

Keywords

FAQs

Package last updated on 12 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc