Illusory spacecraft
The following is a list of fictional spacecraft of an illusory nature, namely vessels created by some form of mental illusion.

Named

Unnamed

Borg sphere 

In 2376, The Doctor enhanced his program so he could experience daydreams. In one of these, a Borg sphere attacked the ship and incapacitated the bridge crew. The Doctor activated the Emergency Command Hologram and took command. He tried to convince the Borg to stop their attack, but the Collective insisted that "You will be assimilated". The ECH then activated the photonic cannon and destroyed the sphere with a single shot. ()

Delta Rana warship

Dream Alien ship

Federation

Class 2 shuttle

Type 6 shuttlecraft 
This illusory Voyager Type 6 shuttlecraft appeared to Neelix as part of a vision quest with Chakotay, where the former was spoken to by Tom Paris from aboard this shuttle, where Neelix had originally died. ()

Type 8 shuttle 
Tom Paris had a nightmare that he was aboard this Type 8 shuttlecraft while under the influence of the Dream Aliens. 

He was collecting data from orbit of a planet. Suddenly his primary warp manifold ruptured and he lost helm control, thrusters, and auxiliary power. As his orbit began to decay his com signal was breaking up and Chakotay was unable to hear his request for an emergency beam out. During the event, a mysterious alien appeared outside the shuttle, looking in the forward windscreen. ()

Nagilum's warbird 

This illusion of a  Romulan warbird was created by Nagilum. It opened fire on the , which returned fire and destroyed the warbird with a single photon torpedo. Captain Picard noted that "that was too easy" and Data detected no debris from the Romulan ship. These were signs that something strange was going on. ()

Q's Chokuzan vessel 

In 2378, Q Junior encountered this Chokuzan vessel after escaping  aboard the . When Junior refused to give into the Chokuzan's demands for surrender, they attacked the Flyer and injured Junior's friend, Icheb. 

In exchange for information to help Icheb, Junior returned to the Chokuzan vessel with Captain Kathryn Janeway, so that he could surrender himself to the occupants of the starship, after which it was revealed to have been created by Q to test his son's morality. ()