Deepseek ArtifactsDeepseek Artifacts

Alarm App Guide

4.0
en
Technology
Alarm
App Development
Programming

Prompt

Create applications Alarm 

Generated Result

import React, { useState } from 'react';
import './App.css';

function App() {
  const [alarms, setAlarms] = useState([]);
  const [newAlarm, setNewAlarm] = useState('');

  const addAlarm = () => {
    if (newAlarm) {
      setAlarms([...alarms, newAlarm]);
      setNewAlarm('');
    }
  };

  const deleteAlarm = (index) => {
    const updatedAlarms = alarms.filter((_, i) => i !== index);
    setAlarms(updatedAlarms);
  };

  return (
    <div className='App bg-gray-100 min-h-screen p-8'>
      <h1 className='text-4xl font-bold text-center mb-8 text-gray-800'>Alarm System ⏰</h1>
      <div className='max-w-md mx-auto bg-white p-6 rounded-lg shadow-lg'>
        <div className='flex mb-6'>
          <input
            type='time'
            className='flex-1 p-2 border border-gray-300 rounded-l-lg focus:outline-none'
            value={newAlarm}
            onChange={(e) => setNewAlarm(e.target.value)}
          />
          <button
            className='px-4 py-2 bg-blue-500 text-white rounded-r-lg hover:bg-blue-600'
            onClick={addAlarm}
          >
            Add Alarm
          </button>
        </div>
        <div>
          {alarms.map((alarm, index) => (
            <div key={index} className='flex justify-between items-center p-2 border-b border-gray-200'>
              <div className='text-lg text-gray-700'>{alarm}</div>
              <button
                className='px-3 py-1 bg-red-500 text-white rounded hover:bg-red-600'
                onClick={() => deleteAlarm(index)}
              >
                Delete
              </button>
            </div>
          ))}
        </div>
      </div>
      <div className='text-center mt-8 text-gray-500'>
        © 2025 Alarm System. All rights reserved.
      </div>
    </div>
  );
}

export default App;

More Recommendations

View All

Build ChatGPT-Like Web Interface

4.0
Software Development
en
AI Integration
Full-Stack Development
ChatGPT
UI Design
Backend Orchestration
You are a professional full-stack developer AI with deep experience in building AI-integrated UIs, backend orchestration, and vector memory systems. I want you to build a **web-based ChatGPT-like int...

Flutter 产品列表页

4.0
编程开发
en
Flutter
Dart
产品列表
class ProductListPage extends StatefulWidget { final bool useArabic; const ProductListPage({super.key, this.useArabic = false}); @override State<ProductListPage> createState() => _ProductLis...

Flutter产品列表页

4.0
编程开发
en
Flutter
产品列表
Widget
class ProductListPage extends StatefulWidget { final bool useArabic; const ProductListPage({super.key, this.useArabic = false}); @override State<ProductListPage> createState() => _ProductLis...

Build XO App with AI

4.0
Programming
en
Tic Tac Toe
AI Game
JavaScript
create a complete XO (Tic Tac Toe) app with AI opponent: "Build a modern, fully-featured Tic Tac Toe (XO) app that includes: A clean, user-friendly interface optimized for mobile, tablet, and web. ...

Generate YouTube Subscribers

4.0
Technology
en
YouTube
Subscribers
App
Make an app let generate YouTube subscribers and and comments by enter your username after that the says how many subscribers and like do you want so you type the amount of likes and subscribers , so ...

YouTube Subscribers App

4.0
Technology
en
YouTube
Subscribers
App
Make an app let generate YouTube subscribers and and comments by enter your username after that the says how many subscribers and like do you want so you type the amount of likes and subscribers , so ...