vue-to-print
Version:
A Vue 3 component to print the content of an element or a component.
53 lines (30 loc) • 3.23 kB
Markdown
# vue-to-print
You've created a Vue component and would love to give end users the ability to print out the contents of that component. This package aims to solve that by popping up a print window with CSS styles copied over as well.



[](https://github.com/semantic-release/semantic-release)
[](https://app.netlify.com/sites/vue-to-print/deploys)
## What is this?
This is the Vue 3.x version of [ReactToPrint](https://github.com/gregnb/react-to-print).
> Thanks to the [contributors](https://github.com/gregnb/react-to-print/graphs/contributors) of `ReactToPrint` whose work made this package possible.
VueToPrint aims to be as consistent as possible with ReactToPrint so that you can use the same API. However, there are some differences due to the differences between Vue 3.x and React.
## Documentation
- [Online Documentation](https://vue-to-print.siaikin.website/)
### Example
Click any of the buttons below to start a new development environment to demo or contribute to the codebase without having to install anything on your machine:
###### Recommended
[](https://codesandbox.io/p/devbox/github/siaikin/vue-to-print-example?embed=1)
###### Untested
[](https://stackblitz.com/github/siaikin/vue-to-print-example)
[](https://replit.com/github/siaikin/vue-to-print-example)
[](https://codespaces.new/siaikin/vue-to-print-example)
[](https://app.codeanywhere.com/#https://github.com/siaikin/vue-to-print-example)
[](https://gitpod.io/#https://github.com/siaikin/vue-to-print-example)
[](https://vscode.dev/github/siaikin/vue-to-print-example)
[](https://glitch.com/edit/#!/import/github/siaikin/vue-to-print-example)
## Thanks

> Thank JetBrains for providing an [open-source license](https://jb.gg/OpenSourceSupport), which allows me to use such an excellent IDE.
## License
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fsiaikin%2Fvue-to-print?ref=badge_large&issueType=license)