odd-components

Svelte components you might occasionally want!

Install

npm i odd-components

Components

PlayingCard

  • no custom icons, uses utf-8

live-demo

DEMO

Svelte

<script>
    import { PlayingCard } from 'odd-components'

    // using TS
    // let my_deck: PlayingCard['$$prop_def']['card'][]

    /** @type {PlayingCard['$$prop_def']['card'][]} */
    let my_deck

    my_deck = [
        { suit: 'HEARTS', value: '10' },
        { suit: 'SPADES', value: 'K' },
        { suit: 'CLUBS', value: 'J' },
        { suit: 'DIAMONDS', value: 'Q' }
    ]
</script>

{#each my_deck as card}
    <PlayingCard {card} />
{/each}

Top categories

svelte logo

Need a Svelte website built?

Hire a professional Svelte developer today.
Loading Svelte Themes