A beautiful, customizable React booking component for appointment scheduling. Drop it into any React app β calendar, time slots, and booking form included.
- π Interactive Calendar β Navigate months, see available dates at a glance
- β° Time Slot Picker β Auto-fetches available slots per date
- π Built-in Form β Name, email, phone, service selection, meeting type
- π¨ Fully Customizable β Change colors, services, labels, everything
- π± Mobile Responsive β Works perfectly on all screen sizes
- π API Agnostic β Works with any backend that serves available slots
- π« No Dependencies β Only React as a peer dependency
- β¨ Beautiful Default Styles β Looks great out of the box
npm install @softangeles/react-booking-widget
import { BookingWidget } from '@softangeles/react-booking-widget';
import '@softangeles/react-booking-widget/dist/styles.css';
function App() {
return (
<BookingWidget
apiUrl="https://your-api.com/api/bookings"
title="Book a Free Consultation"
primaryColor="#6366f1"
onSuccess={(booking) => console.log('Booked!', booking)}
/>
);
}
Your backend needs to implement these endpoints:
Returns which dates have available slots:
{
"month": "2024-03",
"dates": [
{ "date": "2024-03-04", "has_slots": true, "slot_count": 8 },
{ "date": "2024-03-05", "has_slots": false, "slot_count": 0 }
]
}
Returns available time slots for a date:
{
"date": "2024-03-04",
"slots": ["09:00", "09:30", "10:00", "10:30", "14:00", "14:30"]
}
Creates a booking:
{
"name": "John Smith",
"email": "john@example.com",
"phone": "555-1234",
"businessName": "Smith Law",
"service": "consultation",
"meetingType": "zoom",
"message": "Interested in a website redesign",
"date": "2024-03-04",
"time": "10:00"
}
Returns:
{
"referenceCode": "SA-AB12",
"name": "John Smith",
"email": "john@example.com",
"bookingDate": "2024-03-04",
"bookingTime": "10:00",
"status": "confirmed"
}
| Prop | Type | Default | Description |
|---|---|---|---|
apiUrl |
string |
required | Base URL for booking API |
title |
string |
"Book a Consultation" |
Widget header title |
subtitle |
string |
"Pick a date and time..." |
Header subtitle |
primaryColor |
string |
"#6366f1" |
Brand color (hex) |
services |
{value, label}[] |
Consultation, Website, Marketing | Service dropdown options |
meetingTypes |
{value, label}[] |
Zoom, Phone, In Person | Meeting type options |
slotDuration |
string |
"30 min" |
Displayed slot duration |
onSuccess |
function |
β | Called after successful booking |
onError |
function |
β | Called on booking error |
className |
string |
β | Additional CSS class |
<BookingWidget
apiUrl="/api/bookings"
primaryColor="#10b981" // Green theme
/>
<BookingWidget
apiUrl="/api/bookings"
services={[
{ value: 'haircut', label: 'π Haircut' },
{ value: 'color', label: 'π¨ Color Treatment' },
{ value: 'styling', label: 'β¨ Styling' },
]}
/>
Override any CSS class prefixed with sa-bw-:
.sa-bw-root {
max-width: 600px;
border-radius: 24px;
}
.sa-bw-header {
background: linear-gradient(135deg, #10b981, #059669);
}
git clone https://github.com/softangeles/react-booking-widget.git
cd react-booking-widget
npm install
npm run dev # Start demo
npm run build # Build package
This widget handles the frontend. Need the full stack?
SoftAngeles builds custom booking systems, websites, and digital solutions for businesses.
- π Custom website design & development
- π Full booking system with admin dashboard
- π± Mobile-responsive, SEO-optimized
- πΊπΈ Based in Los Angeles, CA
MIT Β© SoftAngeles