Slot picker
<devalender-slots> renders only the day and time picker, with a timezone selector. It does not collect name or email and does not book. Use it when your own form or app owns the rest of the flow and you only need the invitee to choose a time. Generate a snippet with the embed builder.
<script src="https://devalender.com/widget.js"></script>
<devalender-slots handle="ada" event="intro-call"></devalender-slots>
<script>
document.addEventListener('devalender:slot-selected', (e) => {
const { start, end, timezone } = e.detail;
console.log(start, end, timezone);
});
</script>Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
handle | string | - | The host handle, the part after devalender.com/. Required unless team is set. |
team | string | - | The team slug, the part after devalender.com/team/. Books round-robin across the team and takes the place of handle. |
event (required) | string | - | The event type slug. |
accent | hex colour | #2563eb | Colour for buttons and selection, like #7c3aed. In dark theme the widget derives a lighter link colour from it. |
theme | "light" | "dark" | light | Colour scheme of the widget. |
api-url | URL | https://devalender.com/api | API base URL. Defaults to the origin that served widget.js, then devalender.com. |
web-origin | URL | origin of api-url | Origin used for the "Manage or reschedule" and "Powered by" links. |
Events
| Event | When | detail |
|---|---|---|
devalender:slot-selected | The invitee picked a time. | start, end, timezone |
start and end are ISO 8601 timestamps. To finish the booking, send start plus the invitee's name, email and timezone to the public booking endpoint.
React
import { DevalenderSlots } from '@devalender/widget/react';
export function PickTime({ onPick }: { onPick: (start: string) => void }) {
return (
<DevalenderSlots
handle="ada"
event="intro-call"
onSlotSelected={(e) => onPick(e.detail.start)}
/>
);
}Theming
Same as the booking widget: theme, accent and the --dvl-* custom properties, including the lighter link colour derived from accent in dark theme.
Troubleshooting
- Empty picker. The host has no availability in the next weeks, or the event type is inactive.
- No
slot-selectedevent. Listen ondocumentor the element itself; events bubble and cross the shadow boundary.