Use the extension ID to find in VSC marketplace: Jabun.vanilla-extract-react-snippets https://marketplace.visualstudio.com/items?itemName=Jabun.vanilla-extract-react-snippets
After installation of this snippets, add this inside your settings
"editor.snippetSuggestions": "top",
Snippets | Content |
---|---|
ivs | import { style } |
ivsv | Import { styleVariants } |
ivk | Import { keyframes } |
iva | import * as styles from './[file].css |
vsr | Create style rule |
vesr | Create & export style rule |
vsv | Create styleVariants |
vesv | Create & export styleVariants |
vke | Create keyframe |
veke | Create & export keyframe |
vmq | Create media query |
vse | Create selectors |
vsc | Create style composition |
vesc | Create & export style composition |
vus | Use styles in className |
vsp | Use sprinkles |
import { style } from '@vanilla-extract/css';
import { styleVariants } from '@vanilla-extract/css';
import { keyframes } from '@vanilla-extract/css';
import * as styles from './${1:$TM_FILENAME_BASE}.css';
const $1 = style({
$2: $3
});
export const $1 = style({
$2: $3
});
const $1 = styleVariants({
$2: {
$3: $4,
},
});
export const $1 = styleVariants({
$2: {
$3: $4,
},
});
const $1 = keyframes({
'$2': {
$3: $4,
},
});
export const $1 = keyframes({
'$2': {
$3: $4,
},
});
'@media': {
'screen and (min-width: $1px)': {
$2: $3,
},
},
selectors: {
'$1': {
$2: $3,
},
},
const $1 = style([$2, { $3: $4 }]);
export const $1 = style([$2, { $3: $4 }]);
className={styles.$1}
className={sprinkles({
$1: $2
})}