Panda CSS provides several functions for writing typesafe styles using object syntax. The basic
function for styling is the css
function.
For example, to style a div with a red background and white text, we write it as:
<div
className={css({
backgroundColor: 'red',
color: 'white',
})}
>
Something here
</div>
Panda also provides shorthands for common CSS properties to reduce code verbosity.
background → bg
padding → p
margin → m
borderRadius → rounded
boxShadow → shadow