Socket
Book a DemoInstallSign in
Socket

@bridged.xyz/remote-ui-core

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bridged.xyz/remote-ui-core

> New to remote-ui? read [this](../README.md) > "remote-ui is for sending client built-ui-data. yes you can customize the looks, but not a recommanded way."

0.0.31
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

remote ui core

New to remote-ui? read this "remote-ui is for sending client built-ui-data. yes you can customize the looks, but not a recommanded way."

Installation

# install with yarn
yarn add @bridged.xyz/remote-ui-core

# install with npm
npm install @bridged.xyz/remote-ui-core

UI Importing

// method 1. root import
import * as rui from "@bridged.xyz/remote-ui-core";
new rui.UI.Text("remote ui rules  😎")

// method 2. namespace import
import { UI } from "@bridged.xyz/remote-ui-core";
new UI.Text("remote ui rules  😎")

// method 3. component import
import { Text } from "@bridged.xyz/remote-ui-core/components";
new Text("remote ui rules 😎")

Usage: Building Layout / Component

import { icons, UI, layouts, Actions } from "@bridged.xyz/remote-ui-core";

const cardLayout = new layouts.search.BasicSearchItemLayout({
    avatar: new UI.Icon(icons.material.add),
    title: new UI.Text("GY"),
    chips: [
        new UI.Chip(
            new UI.Text("wonder")
        ),
        new UI.Chip(
            new UI.Text("what you're")
        ),
        new UI.Chip(
            new UI.Text("doing")
        )
    ],
    content: new UI.Text("i love you gy"),
    onTap: new Actions.PushRoute("/lovers/gy")
})

console.log(cardLayout.build());

logs...

{
  "avatar": {
    "icon": {
      "uri": "material://Icons.add",
      "type": "MATERIAL_NATIVE"
    }
  },
  "title": {
    "text": "GY"
  },
  "content": {
    "text": "i love you gy"
  },
  "chips": [
    {
      "label": {
        "text": "wonder"
      }
    },
    {
      "label": {
        "text": "what you're"
      }
    },
    {
      "label": {
        "text": "doing"
      }
    }
  ],
  "onTap": {
    "data": {
      "route": "/lovers/gy"
    },
    "namespace": "GENERAL",
    "session": {
      "id": "3GaskEig7epzIFTXYfG2Zw=="
    },
    "type": "PUSH_ROUTE"
  }
}

Concepts

  • Actions
  • Components
  • Layouts
  • Screens

Examples

code remote-ui-core usage example

dependency

  • mustache
  • url-pattern

FAQs

Package last updated on 26 Sep 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.