npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@babeard/svelte-heroicons

v2.0.3

Published

Svelte wrappers for the Heroicons v2 library.

Downloads

625

Readme

svelte-heroicons

Please note: This is a temprorary fork of rgossiaux/svelte-heroicons until v2 support is merged.

Yet another Svelte wrapper for Heroicons.

This library differs from others in a couple main ways:

  • The icon components forward common event listeners to the underlying SVG, so you may use on:click and so on;
  • The API is closer to the official React wrappers, making it easier to use when converting Tailwind UI components to Svelte in conjunction with svelte-headlessui;
  • It's based on Heroicons 2.1.1

Installation

npm install -D @babeard/svelte-heroicons@next

Usage

Heroicons contains three types of icons: outline, solid, mini, and micro. They can be imported from @babeard/svelte-heroicons/outline, @babeard/svelte-heroicons/solid, @babeard/svelte-heroicons/mini, and @babeard/svelte-heroicons/micro respectively.

All icon names are CamelCased and end with the word Icon; for example, the academic-cap icon on heroicons.com is imported as AcademicCapIcon.


<script>
  import { MegaphoneIcon } from "@babeard/svelte-heroicons/solid";
  import { CheckIcon } from "@babeard/svelte-heroicons/outline";
  import { ChatBubbleLeftIcon } from "@babeard/svelte-heroicons/mini"
</script>

<CheckIcon />
<MegaphoneIcon class="my-class" aria-hidden="true" />
<ChatBubbleLeftIcon />

Upgrading to v2

With the new release of hericons, there are some breaking changes to be aware of.

See the heroicons v2 release notes for additional information.

New Icon Styles

There are now 3 styles of icons to choose from instead of 2

  • Outline — line icons with a 1.5px stroke, drawn in a 24px view box.
  • Solid — solid icons with filled shapes, drawn in a 24px view box.
  • Mini — solid icons with filled shapes, drawn in a 20px view box.
  • Micro — solid icons with filled shapes, drawn in a 16px view box.

Note: The old Solid with the view box size of 20px was essentially renamed to Mini in v2.

Icons Renamed

Many icons were renamed to more literal names. For exmaple, MailIcon has been renamed to EnvelopeIcon, and SearchIcon has been renamed to MagnifyingGlassIcon.

| Old Name | New Name | | -------- | ------ | |AdjustmentsIcon|AdjustmentsVerticalIcon| |AnnotationIcon|ChatBubbleBottomCenterTextIcon| |ArchiveIcon|ArchiveBoxIcon| |ArrowCircleDownIcon|ArrowDownCircleIcon| |ArrowCircleLeftIcon|ArrowLeftCircleIcon| |ArrowCircleRightIcon|ArrowRightCircleIcon| |ArrowCircleUpIcon|ArrowUpCircleIcon| |ArrowNarrowDownIcon|ArrowLongDownIcon| |ArrowNarrowLeftIcon|ArrowLongLeftIcon| |ArrowNarrowRightIcon|ArrowLongRightIcon| |ArrowNarrowUpIcon|ArrowLongUpIcon| |ArrowSmLeftIcon|ArrowSmallLeftIcon| |ArrowSmRightIcon|ArrowSmallRightIcon| |ArrowSmUpIcon|ArrowSmallUpIcon| |ArrowSmDownIcon|ArrowSmallDownIcon| |ArrowsExpandIcon|ArrowsPointingOutIcon| |BadgeCheckIcon|CheckBadgeIcon| |BanIcon|NoSymbolIcon| |BookmarkAltIcon|BookmarkSquareIcon| |CashIcon|BanknotesIcon| |ChartSquareBarIcon|ChartBarSquareIcon| |ChatAlt2Icon|ChatBubbleLeftRightIcon| |ChatAltIcon|ChatBubbleLeftEllipsisIcon| |ChatIcon|ChatBubbleOvalLeftEllipsisIcon| |ChipIcon|CpuChipIcon| |ClipboardCheckIcon|ClipboardDocumentCheckIcon| |ClipboardCopyIcon|ClipboardDocumentIcon| |ClipboardListIcon|ClipboardDocumentListIcon| |CloudDownloadIcon|CloudArrowDownIcon| |CloudUploadIcon|CloudArrowUpIcon| |CodeIcon|CodeBracketIcon| |CollectionIcon|RectangleStackIcon| |ColorSwatchIcon|SwatchIcon| |CursorClickIcon|CursorArrowRaysIcon| |DatabaseIcon|CircleStackIcon| |DesktopComputerIcon|ComputerDesktopIcon| |DeviceMobileIcon|DevicePhoneMobileIcon| |DocumentAddIcon|DocumentPlusIcon| |DocumentDownloadIcon|DocumentArrowDownIcon| |DocumentRemoveIcon|DocumentMinusIcon| |DocumentReportIcon|DocumentChartBarIcon| |DocumentSearchIcon|DocumentMagnifyingGlassIcon| |DotsCircleHorizontalIcon|EllipsisHorizontalCircleIcon| |DotsHorizontalIcon|EllipsisHorizontalIcon| |DotsVerticalIcon|EllipsisVerticalIcon| |DownloadIcon|ArrowDownTrayIcon| |DuplicateIcon|Square2StackIcon| |EmojiHappyIcon|FaceSmileIcon| |EmojiSadIcon|FaceFrownIcon| |ExternalLinkIcon|ArrowTopRightOnSquareIcon| |ExclamationIcon|ExclamationTriangleIcon| |EyeOffIcon|EyeSlashIcon| |FastForwardIcon|ForwardIcon| |FilterIcon|FunnelIcon| |FolderAddIcon|FolderPlusIcon| |FolderDownloadIcon|FolderArrowDownIcon| |FolderRemoveIcon|FolderMinusIcon| |GlobeIcon|GlobeAmericasIcon| |HandIcon|HandRaisedIcon| |InboxInIcon|InboxArrowDownIcon| |LibraryIcon|BuildingLibraryIcon| |LightningBoltIcon|BoltIcon| |LocationMarkerIcon|MapPinIcon| |LoginIcon|ArrowLeftOnRectangleIcon| |LogoutIcon|ArrowRightOnRectangleIcon| |MailOpenIcon|EnvelopeOpenIcon| |MailIcon|EnvelopeIcon| |MenuAlt1Icon|Bars3CenterLeftIcon| |MenuAlt2Icon|Bars3BottomLeftIcon| |MenuAlt3Icon|Bars3BottomRightIcon| |MenuAlt4Icon|Bars2Icon| |MenuIcon|Bars3Icon| |MinusSmIcon|MinusSmallIcon| |MusicNoteIcon|MusicalNoteIcon| |OfficeBuildingIcon|BuildingOfficeIcon| |PencilAltIcon|PencilSquareIcon| |PhoneIncomingIcon|PhoneArrowDownLeftIcon| |PhoneMissedCallIcon|PhoneXMarkIcon| |PhoneOutgoingIcon|PhoneArrowUpRightIcon| |PhotographIcon|PhotoIcon| |PlusSmIcon|PlusSmallIcon| |PuzzleIcon|PuzzlePieceIcon| |QrcodeIcon|QrCodeIcon| |ReceiptTaxIcon|ReceiptPercentIcon| |RefreshIcon|ArrowPathIcon| |ReplyIcon|ArrowUturnLeftIcon| |RewindIcon|BackwardIcon| |SaveAsIcon|ArrowDownOnSquareStackIcon| |SaveIcon|ArrowDownOnSquareIcon| |SearchCircleIcon|MagnifyingGlassCircleIcon| |SearchIcon|MagnifyingGlassIcon| |SelectorIcon|ChevronUpDownIcon| |SortAscendingIcon|BarsArrowUpIcon| |SortDescendingIcon|BarsArrowDownIcon| |SpeakerphoneIcon|MegaphoneIcon| |StatusOfflineIcon|SignalSlashIcon| |StatusOnlineIcon|SignalIcon| |SupportIcon|LifebuoyIcon| |SwitchHorizontalIcon|ArrowsRightLeftIcon| |SwitchVerticalIcon|ArrowsUpDownIcon| |TableIcon|TableCellsIcon| |TemplateIcon|RectangleGroupIcon| |TerminalIcon|CommandLineIcon| |ThumbDownIcon|HandThumbDownIcon| |ThumbUpIcon|HandThumbUpIcon| |TranslateIcon|LanguageIcon| |TrendingDownIcon|ArrowTrendingDownIcon| |TrendingUpIcon|ArrowTrendingUpIcon| |UploadIcon|ArrowUpTrayIcon| |UserAddIcon|UserPlusIcon| |UserRemoveIcon|UserMinusIcon| |ViewBoardsIcon|ViewColumnsIcon| |ViewGridAddIcon|SquaresPlusIcon| |ViewGridIcon|Squares2x2Icon| |ViewListIcon|Bars4Icon| |VolumeOffIcon|SpeakerXMarkIcon| |VolumeUpIcon|SpeakerWaveIcon| |XIcon|XMarkIcon| |ZoomInIcon|MagnifyingGlassPlusIcon| |ZoomOutIcon|MagnifyingGlassMinusIcon|

Documentation

See heroicons.com for the full list of icons.

License

As with the main Heroicons library, this library is MIT licensed.

Credit

All credit goes to Tailwind Labs for designing the icons and to the original ancestor to this fork rgossiaux/svelte-heroicons.