on hover a custom class definition for List view formatter

%3CLINGO-SUB%20id%3D%22lingo-sub-1516380%22%20slang%3D%22en-US%22%3Eon%20hover%20a%20custom%20class%20definition%20for%20List%20view%20formatter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1516380%22%20slang%3D%22en-US%22%3E%3CP%3EI%20have%20been%20using%20the%20sample%20given%20in%20the%20GitHub%20for%20SharePoint%20List%20view%20formatting%3C%2FP%3E%3CP%3EHowever%2C%20i%20want%20to%20apply%20styles%20of%20my%20own%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ei%20have%20a%20requirement%20where%20i%20have%20to%20apply%20a%20class%20on%20hover%20of%20a%20div.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20not%20found%20the%20example%20%3CA%20title%3D%22here%22%20href%3D%22https%3A%2F%2Fgithub.com%2Fpnp%2Fsp-dev-list-formatting%22%20target%3D%22_self%22%20rel%3D%22noopener%20noreferrer%22%3Ehere%3C%2FA%3E%3C%2FP%3E%3CP%3EIs%20it%20that%20we%20have%20to%20use%20given%20classes%20in%20the%20page%20and%20we%20can%20define%20inside%20the%20json%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1516380%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAPIs%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1517765%22%20slang%3D%22en-US%22%3ERe%3A%20on%20hover%20a%20custom%20class%20definition%20for%20List%20view%20formatter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1517765%22%20slang%3D%22en-US%22%3EHi%2C%20you%20can%20try%20using%20the%20style%20attribute%20to%20define%20all%20the%20css%20properties%20for%20the%20div%20instead%20of%20using%20the%20default%20classnames.%3C%2FLINGO-BODY%3E
Regular Contributor

I have been using the sample given in the GitHub for SharePoint List view formatting

However, i want to apply styles of my own

 

i have a requirement where i have to apply a class on hover of a div.

 

I have not found the example here

Is it that we have to use given classes in the page and we can't define a class inside the json.

2 Replies
Hi, you can try using the style attribute to define all the css properties for the div instead of using the default classnames.

@Sudharsan K  how do i invoke hover from style attribute