About
A coursework hand-in card that shows a deadline countdown, flags late work, and lets a student attach files, turn them in, or unsubmit to make changes.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Assignment Submission to your project and fits it to your theme.
Code
How Assignment Submission is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import * as React from "react";
import { AssignmentSubmission } from "@/components/ui/assignment-submission";
import { toast } from "sonner";
export default function AssignmentSubmissionExample() {
// Due in two days, fixed at mount so it doesn't change on re-render.
const [due] = React.useState(() => new Date(Date.now() + 2 * 86_400_000));
return (
<div className="w-full max-w-md">
<AssignmentSubmission
due={due}
onSubmit={async (files) => {
await new Promise((resolve) => setTimeout(resolve, 600));
toast.success(`Turned in ${files.length} files`);
}}
/>
</div>
);
}







