본문으로 건너뛰기
언어

Policy listhospitality

House rules and cancellation policy with check-in and check-out times and a zone-aware cancellation state.

설치

pnpm
pnpm dlx shadcn@4.23.0 add @uikit/policy-list

의존 아이템accordionlocalestatus-badgestyle

Default

policy-list-demo.tsx
import { dateOnly, timeOfDay } from "@plott/webkit-time";import { PolicyList, cancellationState } from "@/components/ui/policy-list";
const cancellation = cancellationState({  checkIn: dateOnly("2026-07-20"),  now: Date.UTC(2026, 6, 1, 12),  timeZone: "America/New_York",  freeUntilDaysBefore: 2,  deadlineTime: timeOfDay("23:59"),  refundable: true,});
export default function PolicyListDemo() {  return (    <PolicyList      checkInTime={timeOfDay("15:00")}      checkOutTime={timeOfDay("11:00")}      cancellation={cancellation}      timeZone="America/New_York"      rules={[        { id: "smoking", title: "Smoking", body: "Smoking is not allowed inside the rooms." },        { id: "pets", title: "Pets", body: "Pets are allowed on request." },      ]}      defaultOpen={["cancellation"]}    />  );}