Coder Social home page Coder Social logo

dipaksarkar / components-navbar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from grapesjs/components-navbar

0.0 0.0 0.0 283 KB

Simple navbar component for the GrapesJS editor

License: BSD 3-Clause "New" or "Revised" License

TypeScript 91.44% HTML 7.69% JavaScript 0.87%

components-navbar's Introduction

GrapesJS Navbar

Simple navbar component for GrapesJS editor

GrapesJS


Summary

  • Plugin name: grapesjs-navbar
  • Blocks: navbar
  • Components:
    • navbar, navbar-container, navbar-nav-menu, navbar-nav-menu-link, navbar-burger-menu, navbar-burger-menu-line

Options

Option Description Default
id The ID used to create the block and component. navbar
label The label used for the block and the component. Navbar
block Object to extend the default block, eg. { category: 'Extra', ... }. Pass a falsy value to avoid adding the block. {}
style Custom CSS styles for the component. This will replace the default one. ''
styleAdditional Additional CSS styles for the component. These will be appended to the default one. ''
classPrefix Component class prefix. navbar

Download

  • CDN
    • https://unpkg.com/grapesjs-navbar
  • NPM
    • npm i grapesjs-navbar
  • GIT
    • git clone https://github.com/GrapesJS/components-navbar.git.git

Usage

Directly in the browser

<link href="path/to/grapes.min.css" rel="stylesheet"/>
<script src="path/to/grapes.min.js"></script>
<script src="path/to/grapesjs-navbar.min.js"></script>

<div id="gjs"></div>

<script type="text/javascript">
  var editor = grapesjs.init({
      container : '#gjs',
      plugins: ['grapesjs-navbar'],
      pluginsOpts: {
        'grapesjs-navbar': {/* ...options */}
      }
  });
</script>

Modern javascript

import grapesjs from 'grapesjs';
import plugin from 'grapesjs-navbar';

const editor = grapesjs.init({
  container : '#gjs',
  // ...
  plugins: [plugin],
  pluginsOpts: {
    [plugin]: { /* options */ }
  }
  // or
  plugins: [
    editor => plugin(editor, { /* options */ }),
  ],
});

Development

Clone the repository

$ git clone https://github.com/GrapesJS/components-navbar.git.git
$ cd grapesjs-navbar

Install it

$ npm i

Start the dev server

$ npm start

Build before the commit. This will also increase the patch level version of the package

$ npm run build

License

BSD 3-Clause

components-navbar's People

Contributors

artf avatar dipaksarkar avatar

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.