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

svelma-enhanced

v0.4.8

Published

Bulma components for Svelte

Downloads

2

Readme

Svelma is a set of UI components for Svelte based on the Bulma CSS framework. Some features are experimental and are being developed. Pull requests are welcome. Forked from https://github.com/c0bra/svelma. This fork currently only has bug fixes.

Documentation

See documentation and demo here

Setup

1. Install svelma and dependencies via npm

yarn add bulma svelma-enhanced
yarn add -D node-sass svelte-preprocess rollup-plugin-postcss

2. Add the postcss plugin to your rollup config

// rollup.config.js
import postcss from 'rollup-plugin-postcss';
import preprocess from 'svelte-preprocess';

// ...

export default {
  // ...
  plugins: [
    svelte({
      // ...
      preprocess: preprocess()
    }),

    postcss(),
    // ...
  ]
}

3. Import Bulma's CSS and Svelma components

<!-- App.svelte -->
<script>
  import 'bulma/css/bulma.css';
  import { Button } from 'svelma';
</script>

<Button type="is-primary">I'm a Button!</Button>

You can customize Bulma to suit your branding:

  1. Create SASS/SCSS file, say app.scss, and add it to App.svelte
  2. Import required SASS files from Bulma in app.scss
  3. Override SASS/SCSS variables

4. Install Font Awesome icons

Fontawesome Webfonts come with certain side effects and so SVG Icons are recommended for use with svelte.

# add SVG icons
yarn add -D @fortawesome/fontawesome-svg-core @fortawesome/free-brands-svg-icons @fortawesome/free-regular-svg-icons @fortawesome/free-solid-svg-icons

Add fontawesome to your App. The following will add all icons, but you can also add SVG icons selectively if you wanted to make you app a lot smaller.

<!-- App.svelte -->
<script>
  import 'bulma/css/bulma.css';

  // add all fontawesome icons
  import { library, dom } from '@fortawesome/fontawesome-svg-core';
  import { fas } from '@fortawesome/free-solid-svg-icons';
  import { far } from '@fortawesome/free-regular-svg-icons';
  import { fab } from '@fortawesome/free-brands-svg-icons';
  library.add(fab, fas, far);
  dom.watch();
</script>

Alternatively, you shall also use a link tag in your index.html using a CDN, or use webfonts but this is not recommended.

If you are doing server-side rendering with Sapper (or SvelteKit), you'll need to import the .svelte files directly so that your app can compile them, rather than importing from the compiled module.

import Button from 'svelma/src/components/Button.svelte';          // Use this
// import { Button } from 'svelma';                                // Don't use this

License

See attached Licence