Git Product home page Git Product logo

spfx-sidepanel-component's Introduction

spfx-sidepanel-component

Project leverages the PnP Modern Search Extensibility Library pattern to provide a Web Component allowing custom handlebars template developers to open item forms / urls within the search results page in a pop out side panel (iframe).

Installing on SharePoint Online

Build solution using:

gulp clean
gulp bundle --ship
gulp package-solution --ship

Add the .sppkg to your App Catalog and deploy to all site collections.

Adding to your custom handlebars template

Add the web component directly in handlebars code using the following tag:

<pnp-sidepanel-component title="{{Title}}" viewformurl="{{getUrl item}}" position="custom|customNear|extraLarge|large|largeFixed|medium|smallFixedFar|smallFixedNear|smallFluid" size="100px|10rem|40%|etc." newwindow="true|false" ></pnp-sidepanel-component>

title

Contains text appearing in top of the side panel

viewformurl

Contains the URL to the list item / page to be displayed in the side panel.

position

The position of the side panel, either the left or right size. All positions with the exception of custom/customNear leverage device specific breakpoints for width (320-470, 480-639, 640-1023, 1023-1365, 1365px and up). Custom positions do not leverage device specific breakpoints and only accept one width.

Available options:

smallFluid: Renders the Panel with a fluid (full screen) width.

smallFixedFar: Renders the Panel in fixed-width small size, anchored to the near side (left in LTR mode).

smallFixedNear: Renders the Panel in fixed-width small size, anchored to the near side (left in LTR mode).

medium: Renders the Panel in medium size, anchored to the far side (right in LTR mode).

large: Renders the Panel in large size, anchored to the far side (right in LTR mode).

largeFixed: Renders the Panel in large size, anchored to the far side (right in LTR mode), with a fixed width at XX-Large breakpoint.

extraLarge: Renders the Panel in extra large size, anchored to the far side (right in LTR mode).

custom: Renders the Panel in custom size using size parameter, anchored to the far side (right in LTR mode).

customNear: Renders the Panel in custom size using size, anchored to the near side (left in LTR mode).

size

The width of the side panel. May be any valid HTML width value.

newwindow

Determines if users should see the open in new window icon before the link. When the icon is clicked the link opens in a new tab/window. Default false. Set to true to display icon.

Configuring the code

git clone the repo
npm i
npm i -g gulp
gulp

Build options

gulp clean
gulp test
gulp serve
gulp bundle
gulp package-solution

spfx-sidepanel-component's People

Contributors

makingthingsworktoronto avatar

Stargazers

 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.