承接 caiquebispo/livewire-calendar 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

caiquebispo/livewire-calendar

Composer 安装命令:

composer require caiquebispo/livewire-calendar

包简介

A lightweight, customizable Calendar component for Laravel Livewire with TailwindCSS.

README 文档

README

Lightweight and customizable calendar component for Laravel Livewire 3, styled with TailwindCSS. Focused on simplicity, extensibility, and DX.

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

✨ New in v1.1

  • 📱 Enhanced Responsiveness - Adaptive layout for all screen sizes
  • 👆 Swipe Navigation - Swipe left/right to change months on mobile
  • 🎯 Touch-friendly - 44px minimum tap targets for better mobile UX
  • 🔤 Compact Weekdays - Abbreviated weekday names on mobile (D, S, T...)
  • Today Animation - Pulsing indicator for current day
  • 🎨 Smooth Transitions - Animated cell interactions

Requisitos

  • PHP 8.2+
  • Laravel 10+
  • Livewire ^3.5.0|^4.0.0
  • TailwindCSS 3+

Installation

composer require caiquebispo/livewire-calendar

Publishing

You can publish assets, views and config:

# Publish all
php artisan vendor:publish --provider="CaiqueBispo\Calendar\Provider\CalendarServiceProvider"

# Only config
php artisan vendor:publish --provider="CaiqueBispo\Calendar\Provider\CalendarServiceProvider" --tag="config"

# Only views
php artisan vendor:publish --provider="CaiqueBispo\Calendar\Provider\CalendarServiceProvider" --tag="views"

# Only assets
php artisan vendor:publish --provider="CaiqueBispo\Calendar\Provider\CalendarServiceProvider" --tag="assets"

Basic usage

// In your controller or Livewire component
public function render()
{
    $events = [
        [
            "day" => "2025-09-04",
            "data" => [
                ["title" => "Reunião", "id" => 1],
                ["title" => "Entrega", "id" => 2]
            ]
        ],
        [
            "day" => "2025-09-10",
            "data" => [
                ["title" => "Viagem", "id" => 3]
            ]
        ]
    ];
    
    return view('your-view', ['events' => $events]);
}
<!-- In your Blade -->
<livewire:calendar 
    :events="$events" 
    :lazy-load-events="true" 
    :max-items-per-day="2" 
/>

Customization

The calendar offers multiple customization points:

Props

  • events: Event array
  • lazy-load-events: If true, emits calendar:month-changed when month changes (useful for lazy loading)
  • max-items-per-day: Max visible items per day (rest shown in modal)
  • day-cell-view: Blade view path to customize day cell (e.g. calendar.custom-day-cell)
  • mobile-view: Mobile behavior for weeks layout: stack (default) or scroll

Slots

Available slots:

<livewire:calendar :events="$events">
    <!-- Custom header -->
    <x-slot:header>
        <!-- Conteúdo personalizado do cabeçalho -->
    </x-slot:header>
    
    <!-- The old day slot was replaced by day-cell-view. Prefer the Blade partial via `day-cell-view` or `calendar.day_cell_view`. -->
    
    <!-- Custom "see more" modal -->
    <x-slot:modal>
        <!-- Conteúdo personalizado do modal -->
    </x-slot:modal>
</livewire:calendar>

Customizing day cell via Blade partial

You can provide a view to render each day cell. Two options:

  1. Pass on component usage:
<livewire:calendar
    :events="$events"
    day-cell-view="calendar.custom-day-cell"
    mobile-view="scroll"
/>
  1. Define globally in package config (day_cell_view):
// packages/caiquebispo/livewire-calendar/src/config/calendar.php
'day_cell_view' => 'calendar.custom-day-cell',
// 'mobile_view' => 'scroll',

The view receives: date, dayNumber, isCurrentMonth, isToday, events, maxItemsPerDay.

Example in resources/views/calendar/custom-day-cell.blade.php:

<div class="flex flex-col h-full">
    <div class="text-sm font-semibold mb-1">{{ $dayNumber }}</div>
    <div class="space-y-1">
        @foreach(array_slice($events, 0, $maxItemsPerDay) as $event)
            <div wire:click="eventClicked({{ $event['id'] }})" class="text-xs p-1 rounded bg-green-100 text-green-800 truncate cursor-pointer">
                {{ $event['title'] }}
            </div>
        @endforeach
        @if(count($events) > $maxItemsPerDay)
            <button type="button" wire:click="openDayModal('{{ $date }}')" class="text-xs p-1 text-center w-full rounded bg-gray-100 text-gray-700">
                + {{ count($events) - $maxItemsPerDay }} mais
            </button>
        @endif
    </div>
</div>

Events

Emitted Livewire events:

  • calendar:month-changed: when the month changes (useful for lazy loading)
  • calendar:day-clicked: when a day is clicked
  • calendar:event-clicked: when an event is clicked

Dark mode

Fully Tailwind dark mode compatible via dark class on the root element.

Licença

Este pacote é open-source e está disponível sob a licença MIT.

caiquebispo/livewire-calendar 适用场景与选型建议

caiquebispo/livewire-calendar 是一款 基于 Blade 开发的 Composer 扩展包,目前已累计 698 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 09 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「calendar」 「events」 「component」 「laravel」 「Event Calendar」 「tailwind」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 caiquebispo/livewire-calendar 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 caiquebispo/livewire-calendar 我们能提供哪些服务?
定制开发 / 二次开发

基于 caiquebispo/livewire-calendar 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 698
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 14
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: Blade

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-09-04