react evently calendar

ClassNames Prop

Styling Customization with classNames

You can override the default CSS classes of the calendar using the classNames prop. You can view the default styles here.

KeyDescription
rootThe main calendar container
headerThe calendar header
navThe navigation container (month/year and buttons)
monthThe month text
yearThe year text
weekdaysThe weekdays container
weekdayEach weekday label
daysThe days container
dayEach individual day
currentDayHighlight for the current day
lastMonthDays from the previous month
nextMonthDays from the next month

Note: When overriding styles in Tailwind CSS, use the ! prefix. In regular CSS, use !important to ensure your styles take precedence.

For example, removing the background and borders of the weekday container, and making the weekday text size responsive.

SatSunMonTueWedThuFri
25 April26272829301 May23456789101112131415161718192021222324252627282930311 June2345
"use client";

import { Calendar as EventlyCalendar } from "react-evently-calendar";

const Calendar = () => {
return (

<EventlyCalendar
classNames={{
  weekdays: "!text-[0.6rem] md:!text-xs !border-0 !bg-transparent",
  weekday: "!border-0",
}}
/>
); };

export default Calendar;