GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ghostdevv/svelte-hamburgers: Custom Hamburger Icons in Svelte with ease

BranchesTags
Open more actions menu

Latest commit

 

History

341 Commits
341 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
.vscode
.vscode
 
 
src
src
 
 
static
static
 
 
.git-blame-ignore-revs
.git-blame-ignore-revs
 
 
.gitignore
.gitignore
 
 
.prettierrc
.prettierrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package.json
package.json
 
 
pnpm-lock.yaml
pnpm-lock.yaml
 
 
svelte.config.js
svelte.config.js
 
 
tsconfig.json
tsconfig.json
 
 
types.md
types.md
 
 
vite.config.ts
vite.config.ts
 
 

Repository files navigation

🍔 Svelte Hamburgers

A customisable Svelte port of the popular hamburgers.css library.

demo gif

Installation

npm install svelte-hamburgers -D

If you want to use the Svelte 3/4 version of this library, please checkout svelte-hamburgers@4.

Usage

<script lang="ts">
	import { Hamburger } from 'svelte-hamburgers';
</script>

<Hamburger />

View the full docs.

Props

Property Type Default Value Description
open string false Controls and represents whether the hamburger is open.
type string spin The type of burger you want, you can see the types here, it should be lowercase.
title string Hamburger menu Can be used to add a tooltip, also controls the default value of the ariaLabel prop.
ariaLabel string value of title A label that describes the hamburger menu.
ariaControls string This identifies the element(s) whos presence is controlled by the hamburger menu.
--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.
onclick MouseEventHandler<HTMLButtonElement> Fires when the hamburger is clicked. This event won't propagate.

Migrating to svelte-hamburgers v5

  • Now requires Svelte 5, if you require Svelte 3/4 support checkout svelte-hamburgers@4.
  • We now call stopPropagation on hamburger click event for you.
  • The ariaLabel prop now gets its default value from the title prop.

View the full changelog on GitHub.

Support

  • Join the discord
  • Create a issue on the github

About

Custom Hamburger Icons in Svelte with ease

svelte-hamburgers.willow.codes

Topics

hacktoberfesthamburger-menusveltesveltecomponentsveltejs

Resources

Readme
MIT license
Activity

Stars

101 stars

Watchers

1 watching

Forks

13 forks
Report repository

Releases

Sponsor this project

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.