Components

Introduction

Components are the foundation of the Streams UI system. They encapsulate the structural properties, rendering, and logical behavior of UI objects such as forms, tables, and buttons.

Available Components

The components available out of the box are:

Some components are meant to be used within others:

Configuring Components

Components are configured within the stream definition.

// streams/contacts.json
{
    // ...
    "ui": {
        "tables": {
            "default": {
                // ...
            }
        },
        "forms": {
            "default": {
                // ...
            }
        }
    }
}

Accessing UI

You can use the ui method to build any configured UI component for a stream.

$table = Streams::make('contacts')->ui('tables.example');
$form = Streams::make('contacts')->ui('forms.example');

Control Panel API

You can use the control panel API to access any configured UI component for a stream.

GET|POST  /cp/ui/{stream}/{component}/{handle?}