0.2.2 • Published 11 months ago

@monokai/monoco-svelte v0.2.2

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

Monoco for Svelte

Try all options in the interactive demo

Installation

npm install @monokai/monoco-svelte

Usage

You can use Monoco in two ways, as a Svelte action or as a Svelte component. The action (lowercase monoco) is more flexible, as it can use scoped classes, whereas the component (title-cased Monoco) cannot inherit scoped classes so they have to be declared globally.

Svelte action

<script>
	import { monoco } from '@monokai/monoco-svelte'
</script>

<div class="block" use:monoco={{
	borderRadius: 32,
	color: '#f00',
	border: [2, '#000']
}}></div>

<style>
	.block {
		display: block;
		width: 128px;
		height: 128px;
	}
</style>

Svelte Component

<script>
	import { Monoco } from '@monokai/monoco-svelte'
</script>

<Monoco class="block" borderRadius={32} color={'#f00'} border={[2, '#000']}></Monoco>

<style>
	:global .block {
		display: block;
		width: 128px;
		height: 128px;
	}
</style>

Options

Go to the main Monoco repository to see all available options.

0.2.2

11 months ago

0.2.1

11 months ago

0.2.0

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago

0.0.11

12 months ago

0.0.10

12 months ago

0.0.9

12 months ago

0.0.8

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.3

12 months ago

0.0.2

12 months ago

0.0.1

12 months ago