Arihant jain

Responsive Modal

Buttons 6

About

Here is Modal component

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Responsive Modal to your project and fits it to your theme.

Code

How Responsive Modal is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

"use client";
import React from "react";
import {
  ResponsiveModal,
  ResponsiveModalContent,
  ResponsiveModalDescription,
  ResponsiveModalHeader,
  ResponsiveModalTitle,
  ResponsiveModalTrigger,
} from "@/components/ui/responsive-modal";
import { Button } from "@/components/ui/button";

type Side = "top" | "bottom" | "left" | "right";

const ResponsiveModalSide = () => {
  return (
    <div className="space-y-3">
      <div className="space-x-3">
        <Modal side="top" />
        <Modal side="bottom" />
      </div>
      <div className="space-x-3">
        <Modal side="left" />
        <Modal side="right" />
      </div>
    </div>
  );
};

const Modal = ({ side }: { side: Side }) => {
  return (
    <ResponsiveModal>
      <ResponsiveModalTrigger asChild>
        <Button variant="outline">{side}</Button>
      </ResponsiveModalTrigger>
      <ResponsiveModalContent side={side}>
        <ResponsiveModalHeader>
          <ResponsiveModalTitle>
            This dialog will popup from {side} on mobile.
          </ResponsiveModalTitle>
          <ResponsiveModalDescription>
            Lorem Ipsum is simply dummy text of the printing and typesetting
            industry. Lorem Ipsum has been the standard dummy text ever since
            the 1500s, when an unknown printer took a galley of type and
            scrambled it to make a type specimen book. It has survived not only
            five centuries, but also the leap into electronic typesetting,
            remaining essentially unchanged. It was popularised in the 1960s
            with the release of Letraset sheets containing Lorem Ipsum passages,
            and more recently with desktop publishing software like Aldus
            PageMaker including versions of Lorem Ipsum.Lorem Ipsum is simply
            dummy text of the printing and typesetting industry. Lorem Ipsum has
            been the standard dummy text ever since the 1500s, when an unknown
            printer took a galley of type and scrambled it to make a type
            specimen book. It has survived not only five centuries, but also the
            leap into electronic typesetting, remaining essentially unchanged.
            It was popularised in the 1960s with the release of Letraset sheets
            containing Lorem Ipsum passages, and more recently with desktop
            publishing software like Aldus PageMaker including versions of Lorem
            Ipsum.
          </ResponsiveModalDescription>
        </ResponsiveModalHeader>
      </ResponsiveModalContent>
    </ResponsiveModal>
  );
};

export default ResponsiveModalSide;

Dependencies

More by Arihant jain

View all
  • Footer section

    Footer section

    1.9K
  • Multistep Form

    Multistep Form

    713
  • Animated Drawer

    Animated Drawer

    695
  • Status Badge

    Status Badge

    520
  • Stacked Circular Footer

    Stacked Circular Footer

    427
  • Input Modal

    Input Modal

    334
  • Large Name Footer

    Large Name Footer

    199
  • Profile Dropdown

    Profile Dropdown

    197

More in Buttons

View all
  • Texture Button

    Texture Button

    98
  • Button

    Button

    1
  • Button

    Button

    68
  • Eclipse Button

    Eclipse Button

    3
  • Button

    Button

    65
  • App Store Button

    App Store Button

    459
  • HeroUI Button Group

    HeroUI Button Group

    2
  • Base Button

    Base Button

    4