Skip to content

lowdefy/blocks-template

Repository files navigation

Lowdefy Blocks Template

This is a template repository as a basic starting point for developing custom blocks for Lowdefy. For a detailed description of how to build custom blocks, visit the Custom Blocks sections in the docs.

This repository contains basic example of blocks for the five different block categories; display, input, container, context and list. You can read more about how blocks are used in Lowdefy in the Blocks section of the docs.

A Lowdefy block has two files, the block meta data and the block React component.

Running the blocks

  1. You must have node and yarn installed.
  2. Generate a repository from the template on Github or clone this repository.
  3. Run yarn install, then yarn start, then check the you block is served by viewing the meta data at: http://localhost:3002/meta/DisplayBlock.json.
  4. Add the types to you the lowdefy.yaml. For example:
name: my-app
lowdefy: 3.10.1
types:
  DisplayBlock:
    url: http://localhost:3002/meta/DisplayBlock.json
# ...
  1. Use your new block type in your Lowdefy app.
  2. Start your Lowdefy app and test if it works, run: npx lowdefy@latest dev
  3. Continue to develop your block React component. Change to your block will need auto reload the app in the browser, you need to hit refresh.
  4. Before deploying your blocks to a static file server, remember to change the remoteEntryUrl field in the webpack.prod.js file to yout block URL.
  5. Deploy your blocks and enjoy your ☕️.

Other Lowdefy Blocks Packages

More Lowdefy resources

Licence

MIT