What you're looking for is a list command set extension in a SharePoint Framework solution. Check the documentation.
If you want your extension to appear in the right click menu make sure you set the Location attribute to ClientSideExtension.ListViewCommandSet.ContextMenu (or ClientSideExtension.ListViewCommandSet for both the menu and the bar) in the elements.xml file.
What you're looking for is a list command set extension in a SharePoint Framework solution. Check the documentation.
If you want your extension to appear in the right click menu make sure you set the
Locationattribute toClientSideExtension.ListViewCommandSet.ContextMenu(orClientSideExtension.ListViewCommandSetfor both the menu and the bar) in theelements.xmlfile.