Astryx

Astryx Alert Dialog

Forms 1

About

A modal confirmation dialog from Meta's Astryx design system for destructive or high-impact actions.

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

Code

How Astryx Alert Dialog is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

'use client';

import {useState} from 'react';
import {AlertDialog} from '@/components/ui/astryx-alert-dialog';

function AlertDialogAsyncAction() {
  const [isLoading, setIsLoading] = useState(false);

  return (
    <AlertDialog
      isOpen
      isInline
      onOpenChange={() => {}}
      title="Revoke access?"
      description="This user will immediately lose access to all shared resources."
      actionLabel="Revoke"
      isActionLoading={isLoading}
      onAction={async () => {
        setIsLoading(true);
        await new Promise(r => setTimeout(r, 2000));
        setIsLoading(false);
      }}
    />
  );
}

export default function AlertDialogAsyncActionDemo() {
  return (
    <div
      data-astryx-theme="neutral"
      data-theme="light"
      style={{colorScheme: 'light', display: 'contents'}}>
      <AlertDialogAsyncAction />
    </div>
  );
}

Dependencies

More by Astryx

View all
  • Astryx Banner

    Astryx Banner

    56
  • Astryx Avatar

    Astryx Avatar

    28
  • Astryx Aspect Ratio

    Astryx Aspect Ratio

    28
  • Astryx Badge

    Astryx Badge

    25
  • Astryx Button Group

    Astryx Button Group

    23
  • Astryx Toggle Button

    Astryx Toggle Button

    16
  • Astryx Avatar Group

    Astryx Avatar Group

    8
  • Astryx Chat Composer Drawer

    Astryx Chat Composer Drawer

    6

More in Forms

View all
  • Premium Auth

    Premium Auth

    554
  • Book A Demo 1

    Book A Demo 1

    87
  • Login 1

    Login 1

    60
  • Contact Card

    Contact Card

    1.1K
  • Authentication Card

    Authentication Card

    51
  • Form

    Form

    137
  • Form

    Form

    16
  • Modern & Stunning sign in

    Modern & Stunning sign in

    1.7K