<!DOCTYPE html>
      <html lang="en">
        <head>
          <meta charset="utf-8">
          <meta name="viewport" content="width=device-width">
          <meta name="theme-color" content="#000000">
        </head>
        <body>
          <div id="container" style="padding: 24px" />
          <script>const mountNode = document.getElementById('container');</script>
        </body>
      </html>
    
.custom-class .ant-message-notice-content {
  background: #f00 !important;
}
const { createRoot } = ReactDOM;

const {  Button, message  } = antd;
const App = () => {
  const [messageApi, contextHolder] = message.useMessage();
  const success = () => {
    messageApi.open({
      type: 'success',
      content: 'This is a prompt message with custom className and style',
      className: 'custom-class',
      style: {
        marginTop: '20vh',
      }
    });
  };
  return (
    <>
      {contextHolder}
      <Button onClick={success}>Customized style</Button>
    </>
  );
};
const ComponentDemo = App;


createRoot(mountNode).render(<ComponentDemo />);
View Compiled

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

  1. https://unpkg.com/react@18/umd/react.development.js
  2. https://unpkg.com/react-dom@18/umd/react-dom.development.js
  3. https://unpkg.com/dayjs@1/dayjs.min.js
  4. https://unpkg.com/antd@5.21.0/dist/antd-with-locales.min.js
  5. https://unpkg.com/@ant-design/icons/dist/index.umd.js
  6. https://unpkg.com/react-router-dom/dist/umd/react-router-dom.production.min.js
  7. https://unpkg.com/react-router/dist/umd/react-router.production.min.js