import { VeltComments, useVeltClient } from '@veltdev/react';

import { useEffect } from 'react'

export default function YourDocument() {
  const { client } = useVeltClient();  

  useEffect(()=>{
    if(client){
      const commentElement = client.getCommentElement();
      commentElement.enableDarkMode();
      commentElement.disableDarkMode(); 
    }
  })

  return (
    <div>
        <VeltComments darkMode={true} />
    </div>
  )
}

Whether dark mode is enabled.

Default: false

<VeltComments darkMode={true}/>

API Method:

const commentElement = client.getCommentElement();
commentElement.enableDarkMode();
commentElement.disableDarkMode();