Widgets

Alarm clock

Alarms for times of day: switch each on or off, and snooze when it rings.

Installation

npx sinaui add alarm-clock

Examples

Alarms

Add one for a minute from now to hear it. Alarms are remembered in this browser; they ring while the page is open.

No alarms on

  • 5:15AM Fajr
  • 9:00AM Lecture at the Nizamiyya

Add alarm

Alarm

<script lang="ts">
	import AlarmClock, { type Alarm } from '#lib/ui/AlarmClock.svelte';

	let alarms = $state<Alarm[]>([
		{ id: 'fajr', time: '05:15', label: 'Fajr', on: true },
		{ id: 'lecture', time: '09:00', label: 'Lecture at the Nizamiyya', on: false }
	]);
</script>

<AlarmClock bind:alarms persist="sinaui-alarms" />

Props

PropTypeDefault
alarmsAlarm[], bindable[]
persiststring: a storage key
snoozenumber: minutes5
localestring'en'

Accessibility

  • When one rings, a dialog opens and the alarm is announced; Stop and Snooze are its buttons, and Escape stops it.
  • Each switch is named for its alarm (“Fajr at 5:15 AM”), as is each delete button.
  • “Next alarm in…” is read when it changes.
Introduction
Theming
Changelog
Button
Action button
Confirm button
Copy button
Hold to confirm
Split button
Calendar
Checkbox
Color picker
Combobox
Date picker
Date range picker
File drop
Form
Input
Mention input
Multi select
Number field
OTP input
Password input
Phone input
Radio cards
Radio group
Rich text editor
Search field
Segmented control
Select
Signature pad
Slider
Switch
Tag input
Upload
Wheel picker
Textarea
Time field
Toggle group
Toolbar
Alert dialog
Command palette
Context menu
Dialog
Drawer
Dropdown
Hover card
Popover
Tooltip
Announcement bar
Alert
Empty state
Meter
Progress
Rolling number
Skeleton
Spinner
Toast
Avatar
Avatar group
Badge
Card
Carousel
Chart
Chat
Code block
Data table
Folder
Kbd
Mind map
Resizable panels
Scroll area
Separator
Sortable
Table
Tag group
Virtual list
Audio player
Image
Image compare
Video
Visualizer
Breadcrumb
File tree
Menubar
Navigation menu
Pagination
Sidebar layout
Stepper
Tabs
Alarm clock
Clock
Dynamic island
Fluid orb
Hourglass
Stopwatch
Timer
AI chat
AI media
Auth
Board
Booking
Dashboard
File explorer
Messaging
Notifications
Settings
Team
Overview
Pricing
Agent chat
Calendar
Voice agent
Mail inbox
CMS
Blog
Marketing site
E-commerce
AI agents
SaaS landing page
SaaS app
Accordion
Dark theme
Light theme