JSFiddle - React, Tailwind, and code Playground
HTML
<input wrap-input="" />
CSS
div{
border: 1px solid;
padding: 10px;
margin: 10px;
background-color: #ccc;
}
JavaScript
angular.module("myApp",[]).directive("wrapInput",function(){
return {
link: function(scope, element, attributes){
element.wrap('<div />');
}
}
});