项目作者: mdbootstrap

项目描述 :
Svelte Bootstrap with Material Design
高级语言: Svelte
项目地址: git://github.com/mdbootstrap/mdbsvelte.git
创建时间: 2020-05-06T07:32:08Z
项目社区:https://github.com/mdbootstrap/mdbsvelte

开源协议:MIT License

下载






Svelte Bootstrap with Material Design


Based on the latest Bootstrap 4 and Svelte 3. Absolutely no jQuery.



npm

npm version

Read full documentaion at saurav.tech/mdbsvelte

Getting started

Step 1: Install the package

  1. npm i mdbsvelte

Step 2: Add CSS

This package does not contains any css you need to add in your project manually

Add in your HTML layout:

  1. <!-- Font Awesome -->
  2. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
  3. <!-- Google Fonts -->
  4. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
  5. <!-- Bootstrap core CSS -->
  6. <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
  7. <!-- Material Design Bootstrap -->
  8. <link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.16.0/css/mdb.min.css" rel="stylesheet">

or you can add it your svelte app:

  1. <svelte:head>
  2. <!-- Font Awesome -->
  3. <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css">
  4. <!-- Google Fonts -->
  5. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap">
  6. <!-- Bootstrap core CSS -->
  7. <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet">
  8. <!-- Material Design Bootstrap -->
  9. <link href="https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.16.0/css/mdb.min.css" rel="stylesheet">
  10. </svelte:head>

Step 3: Import in your svelte component

  1. <script>
  2. import {MDBBtn} from "mdbsvelte";
  3. </script>
  4. <MDBBtn>Default</MDBBtn>

For server-side side rendering (Sapper)

You need to import from the component source directly.

  1. <script>
  2. import MDBBtn from "mdbsvelte/src/MDBBtn.svelte";
  3. </script>

Components

License

FOSSA Status