Giter Site home page Giter Site logo

hkh12 / svmd Goto Github PK

View Code? Open in Web Editor NEW
8.0 2.0 0.0 552 KB

Material design components for Svelte

Home Page: https://svmd.surge.sh/

License: GNU General Public License v3.0

HTML 63.38% JavaScript 30.10% CSS 6.52%
svelte-components material-design material svelte sveltejs

svmd's Introduction

SVMD

SVMD is a set of Material Design components for Svelte. It wraps each of Google's MDC Web vanilla Components using the simple approach. It is:

  • โœจ Easy to use
  • ๐Ÿ“š Well-documented
  • ๐ŸŽจ Highly customizable
  • ๐ŸŒณ Tree-shakeable

Installation

npm i svmd # npm
yarn add svmd # yarn

Usage

SVMD has a variety of components, and you can import them like this:

import { Button, Slider, Fab } from 'svmd';
import 'svmd/dist/svmd.css';

See the docs about styles for more info about the components' styles.

Documentation

See the docs folder.

svmd's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

svmd's Issues

In the example folder the src the url is not correct

The idea of directly integrating the material component web is good.
while first time running the build it shows error for path

ERROR in ./examples/App.svelte Module not found: Error: Can't resolve '../src/components' in '/home/abhijit/projects/learn/svelte-mui/svmd/examples' @ ./examples/App.svelte 29:0-33:29 66:16-20 111:22-32 262:14-16 269:19-25 276:19-25 284:19-25 293:19-25 491:16-19 499:16-19 507:16-19 587:14-16 607:18-24 690:14-16 707:19-25 721:19-25 739:19-25 875:17-22 936:17-22 997:17-22 1041:17-21 1050:17-21 1059:17-21 1140:14-16 1147:16-20 1273:14-16 1280:18-24 1302:22-30 1415:17-22 1472:21-30 1526:14-16 1658:14-16 1675:20-26 1767:20-28 1837:14-16 1844:21-30 1906:17-21 1914:17-21 1922:17-21 1930:17-21 1938:17-21 1946:17-21 1954:17-21 1962:17-21 2161:21-30 2171:16-20 2178:15-18 @ ./examples/main.js

A simple example in the documentation

As a newcomer to Svelte, some more documentation on how to use the SVMD components is welcome.
The documentation only shows how to import Elements, but not where the import code goes, or how to instantiate and use the actual components in Svelte.
A simple "hello world" like example with a basic button would go a long way. I think that might increase adoption, certainly among newcomers. Also, maybe a rollup config example, I can't seem to get it to work, and I suspect my rollup config...

When I combine the import statement and one of the button examples for example, I get:

Uncaught TypeError: svmd_es.Button is not a constructor
    create_fragment bundle.js:798
    init index.mjs:1451
    App bundle.js:880
    app main.js:4
    <anonymous> bundle.js:897

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.