See yarn add docs.

$ yarn add PACKAGE
$ yarn add PACKAGE --dev