In the V-Model, the project definition and design activities of increasing detail are mirrored by test and integration activities. There is a relation between design artifacts and the tests that are based on these artifacts.
Unit tests (= component tests) are there based on the component specification document. This allows test suites to be created by testers in parallel to the programming effort.
: Compare section 2.2.1 Component Testing in the ISTQB Foundation Level Syllabus 2018.
While this diagram is useful to understand different test levels, it does not match the reality of most software projects: the V-Model is effectively unheard of in most parts of the industry. Many projects will never create explicit design documents or specifications, especially in unstructured or agile environments.
Yet having a record of requirements is useful. TDD and BDD suggest: the test is the specification. BDD style tests can be interpreted as executable documentation, requirements specification, and acceptance test all in one. TDD style tests are a complete specification of a component.
So to answer your main question: I'd suggest that unit tests are based on a detailed design or a component specification, whether these are explicit documents, explicit but the same as the test, or just implicit.