GithubHelp home page GithubHelp logo

dorknstein / angular-schema-form-panel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rthaut/angular-schema-form-panel

0.0 2.0 0.0 25 KB

Bootstrap Panel Decorator for Angular Schema Form

License: MIT License

JavaScript 91.79% HTML 8.21%

angular-schema-form-panel's Introduction

Angular Schema Form Bootstrap Panel Decorator v1.0.0

Adds support for Bootstrap's custom panel component in Angular Schema Form

View the Live Demo on CodePen for examples.


Build status Dependencies status NPM version Bower version

Installation

Install angular-schema-form-panel via npm or bower.

NPM

npm install angular-schema-form-panel

Bower

bower install angular-schema-form-panel

Usage

Include angular-schema-form-panel.min.js (or the un-minified angular-schema-form-panel.js) file in your HTML document(s):

<script src="node_modules/angular-schema-form-panel/dist/angular-schema-form-panel.min.js"></script>

Add schemaFormPanel as an Angular dependency in your application module:

var app = angular.module('myApp', [..., 'schemaForm', 'schemaFormPanel']);

Then use panel as the type in your form's JSON definition:

$scope.form = [
    ...,
    {
        type: "panel",
        items: [...],
        ...options
    }
]

You can also make an accordion of panels by using panel-group as the type (make sure the items of your panel-group are panel objects) in your form's JSON definition:

$scope.form = [
    ...,
    {
        type: "panel-group",
        items: [
            {
                type: "panel",
                items: [...],
                ...options
            },
            {
                type: "panel",
                items: [...],
                ...options
            },
            {
                type: "panel",
                items: [...],
                ...options
            }
        ]
    }
]

Options

You can use the following options on each panel object. All options are optional unless specified.

Option Name Type Description
items array Specifies all items to include in the panel body. Technically optional but without it your panel will be empty.
style string Specifies the panel's contextual style (e.g. success, info, danger, etc.).
Defaults to default.
title string Specifies the title displayed in the header of the panel. This is required for collapsible panels.
footer string Specifies the HTML content added to the panel's footer.
collapsible bool Specifies if the panel can be collapsed. Remember to specify a title for collapsible panels.
Defaults to false.
collapsed bool Specifies if the panel should be collapsed initially. This only applies to collapsible panels.
Defaults to false.
panelClass string Specifies additional class(es) to add to the main panel element.
headingClass string Specifies additional class(es) to add to the panel's heading element.
bodyClass string Specifies additional class(es) to add to the panel's body element.
footerClass string Specifies additional class(es) to add to the panel's footer element.
list bool Specifies if the items should be rendered as elements of a list group.
Defaults to false.

angular-schema-form-panel's People

Contributors

rthaut avatar

Watchers

 avatar  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.