Nothing Special   »   [go: up one dir, main page]

All Projects → ghostdevv → svelte-hamburgers

ghostdevv / svelte-hamburgers

Licence: other
Custom Hamburger Icons in Svelte with ease

Programming Languages

SCSS
7915 projects
Svelte
593 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to svelte-hamburgers

svelte-meteor-data
Reactively track Meteor data inside Svelte components
Stars: ✭ 14 (-48.15%)
Mutual labels:  svelte, sveltejs
http-interceptors
The Web apps in this monorepo make HTTP requests and require uniform consistency in how they are executed and handled. This monorepo demonstrates the same app written with Angular and with Svelte. Each app uses HTTP interceptors. The Angular app uses HttpClient and its interceptors while the Svelte app uses Axios and its interceptors.
Stars: ✭ 46 (+70.37%)
Mutual labels:  svelte, sveltejs
15puzzle
A super simple PWA for 15 Puzzle game. Built with Svelte.
Stars: ✭ 29 (+7.41%)
Mutual labels:  svelte, sveltejs
focus-svelte
focus lock for svelte
Stars: ✭ 18 (-33.33%)
Mutual labels:  svelte, sveltejs
mathesar
Web application providing an intuitive user experience to databases.
Stars: ✭ 95 (+251.85%)
Mutual labels:  svelte, sveltejs
svelte-toy
A toy for svelte data stores
Stars: ✭ 73 (+170.37%)
Mutual labels:  svelte, sveltejs
cv
My online CV using Svelte
Stars: ✭ 35 (+29.63%)
Mutual labels:  svelte, sveltejs
nomie5
Nomie v5 Source Code
Stars: ✭ 528 (+1855.56%)
Mutual labels:  svelte, sveltejs
plugins
Elder.js plugins and community plugins.
Stars: ✭ 80 (+196.3%)
Mutual labels:  svelte, sveltejs
svelte-fa
Tiny FontAwesome 5 component for Svelte
Stars: ✭ 214 (+692.59%)
Mutual labels:  svelte, sveltejs
svelte-simple-icons
📦 This package provides the Simple Icons packaged as a set of Svelte components.
Stars: ✭ 27 (+0%)
Mutual labels:  svelte, sveltejs
svelte-starter-kit
Svelte with brilliant bells and useful whistles
Stars: ✭ 384 (+1322.22%)
Mutual labels:  svelte, sveltejs
its-ok-i-guess
🧐 Guess the game from the Steam review!
Stars: ✭ 41 (+51.85%)
Mutual labels:  svelte, sveltejs
svelteWeb3
A simple, dependency minimized package for building modern dApps with Svelte
Stars: ✭ 14 (-48.15%)
Mutual labels:  svelte, sveltejs
svelte-quotes
A small app to demonstrate use of SvelteJS
Stars: ✭ 16 (-40.74%)
Mutual labels:  svelte, sveltejs
templates
tsParticles website templates collection
Stars: ✭ 42 (+55.56%)
Mutual labels:  svelte, sveltejs
svelte-eslint-parser
Svelte parser for ESLint
Stars: ✭ 30 (+11.11%)
Mutual labels:  svelte, sveltejs
svelte-intl
Internationalize your Svelte apps using format-message and Intl object
Stars: ✭ 48 (+77.78%)
Mutual labels:  svelte, sveltejs
eslint-plugin-svelte
ESLint plugin for Svelte using AST
Stars: ✭ 22 (-18.52%)
Mutual labels:  svelte, sveltejs
svelte3-translation-ru
Russian translation of the official Svelte resources
Stars: ✭ 49 (+81.48%)
Mutual labels:  svelte, sveltejs

🍔 Svelte Hamburgers

The ease to use Hamburger menu component for Svelte! Fully customisable with an extensive set of options, powered by a modified version of hamburgers.css.

Example of how to use svelte-hamburgers, view the repl here

Install

We will save it as a dev dependancy with -D

npm i svelte-hamburgers -D

How to use?

<script>
    import { Hamburger } from 'svelte-hamburgers';

    let open;
</script>

<Hamburger bind:open />

The open variable can be then used to handle your menu, for example:

{#if open}
    <!-- show menu -->
{/if}

Migrating

If you are migrating from 3.x.x to 4.x.x heres what you need to know:

  • CSS is now included! This means no more importing the css you need, you can remove the cdn tags you had before

  • The Hamburger component is a named import:

    <script>
        // Old way
        import Hamburger from 'svelte-hamburgers';
    
        // New way
        import { Hamburger } from 'svelte-hamburgers';
    </script>

Properties

You can use these to customise the hamburger, just provide them as props to the burger component, for example <Hamburger --color="white" />

Property Type Default Description
type string spin The type of burger you want, you can see the types here, it should be lowercase.
--color string black The color of the burger.
--active-color string value of --color The color of the burger when active.
--padding string 15px The padding.
--layer-width string 30px The width of the burger.
--layer-height string 2px The height of the burger.
--layer-spacing string 6px The spacing between layers of the burger.
--border-radius string 4px The border radius of each burger part.
--hover-opacity number 0.7 The opacity amount on hover.
--hover-opacity-active number value of --hover-opacity The opacity amount of hover when active.

Support

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].