TypeScript Usage

TS Example

// enum of icons and the associated ligature / svg name
import { Yoco } "@3yourmind/yoco";

console.log(Yoco.Icon.ANNOUNCE)
// 'announce'

Vue Example

<i class="yoco" v-text="Yoco.Icon.ANNOUNCE" />
import { Yoco } from '@3yourmind/yoco'
import { defineComponent } from 'vue'

export default defineComponent({
	name: 'Example',
	setup() {
		return {
			Yoco,
		}
	},
})

Details

@3yourmind/yoco exports an enum with all icons. The usage of the enum is preferable as it can be checked for correctness by TypeScript. In certain situations, it can also have autocompletion support.