Trip booking
A stay search form with a destination combobox, a two-month date range, guest steppers, and a live price estimate.
bunx --bun @getweini/cli@latest add alert badge button card combobox date-picker-range number-inputCustomize
- Pass your places in `destinations` (`value`, `label`, nightly `rate`, optional search `keywords`) and the starting search in `trip`. The block emits `search` with the destination value, `[checkIn, checkOut]`, and the guest counts.
- The summary updates as the form changes: nights come from the range, rooms from the guest count, and the total from the nightly rate. Replace `rooms` and `total` with your own pricing call when you have one.
- DatePickerRange keeps both dates as `YYYY-MM-DD` strings and serializes them through `checkIn` and `checkOut`. Pass `referenceDate` from the server so SSR and hydration agree on the visible month.
- NumberInput clamps with `min` and `max`, and its button names come from `copy.stepper`. Add a `wheel` prop to the inputs only if you want scrolling to change the count.
- Validation runs after the first search. Set `loading` while your request runs and `error` with a message when it fails. All text, including the plural helpers, lives in the `copy` prop.