Schedule
A day view. Events rise into their slots, overlaps share the width, the open one grows, and a now line with a pulsing dot marks the time. Data.
Open playgroundAbout
Schedule is a React component in the Data category of smoui. It is typed, ships no stylesheet, follows your theme through CSS variables, and honors prefers-reduced-motion. Import it with import { Schedule } from "@ashutoshswamy/smoui" and set events, from, now.
Install
npm i @ashutoshswamy/smouiUsage
import { Schedule } from "@ashutoshswamy/smoui";
<Schedule from={9} to={17} now="11:20" events={[{ id: "1", title: "Standup", start: "09:30", end: "10:00", where: "Room 2" }]} />Props 3
- events
24-hour times like "09:30". Overlaps sit side by side.
{ id; title; start; end; where? }[]- from / to / hour
Hours shown and pixels per hour.
numberdefault8 / 18 / 60- now
Time for the now line. Omit for real time, "" hides it.
string
More data components
- ActivityFeedA feed joined by a thin line. New items slide in at the top while the rest make room; the first load rises in item by item.
- CalendarMonth grid date picker. The month slides the way you travel, the selection glides between days and across months, and arrows, Home, End and Page keys all work.
- DataTableA data table on one flat surface. Search, sort, page and select; rows glide into their new order, one highlight stretches between rows, a selection bar takes over the toolbar, and rows open to detail. People, status and number columns are built in.
- DiffViewA line diff. Changed lines slide in from their side, the part that really changed is marked, and a thumb switches between one column and two.
- FilterListTag chips with live counts above a list. Pick chips and the list narrows: what stays glides up, what goes fades out.
- KanbanA board whose columns wrap to any width. Cards carry tags, priority, a due date and people. Pick one up and it lifts and tilts, a slot opens where it will land and the rest slide apart. Work-in-progress limits, inline add and keyboard moves are built in.