Here is a dynamic grid layout that uses Muuri.js framework for searching and filtering the cards in the grid, you can also drag and drop the cards in the grid.
If you are having trouble with the pen, try the archived copy on GitHub
Search and Filter Grid Snippet
See the Pen Muuri – Grid Demo ( 0.4.0 ) by 王兆羽 (@bcwang) on CodePen.0