uploadcn

Assignment Submission

Component

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>
  );
}

Dependencies

More by uploadcn

View all
  • Progress Ring Upload

    Progress Ring Upload

    8
  • Avatar Upload

    Avatar Upload

    5
  • Chat Attachments

    Chat Attachments

    2
  • Identity Verification

    Identity Verification

    1
  • Document Checklist

    Document Checklist

  • Logo Upload

    Logo Upload

  • Document Upload

    Document Upload

  • Video Upload

    Video Upload