svelte-inline-css Svelte Themes

Svelte Inline Css

like Vue.js inline style in Svelte

svelte-inline-css

Easy to use inline style system like Vue.js inline style in Svelte(Use use:action)

Try it -> REPL

Installation

yarn add svelte-inline-css

Usage

<script lang="ts">
  import style from 'svelte-inline-css';
  export let height: `${number}px` = '0px';
</script>

<div use:style={{ height }} />
<div use:style={{ color: 'red' }}>red</div>

Top categories

Loading Svelte Themes