Section
Display a section that can also be formatted using rows and columns.
Example
php
use Flowframe\Brief\Components\Row;
use Flowframe\Brief\Components\Html;
use Flowframe\Brief\Components\Body;
use Flowframe\Brief\Components\Text;
use Flowframe\Brief\Components\Column;
use Flowframe\Brief\Components\Section;
Html::make(
Body::make(
Section::make(
Text::make('Slot')
),
Section::make(
Row::make(
Column::make('First'),
Column::make('Second')
)
)
)
);
Implements
Styles Interface
Allows a component to receive styles.
php
interface StylesInterface
{
/**
* Style the component.
*/
public function style(Styles $styles): static;
/**
* Get the component styles.
*/
public function getStyles(): Styles;
}
Component Interface
Allows a components to have childeren and render HTML.
php
interface ComponentInterface
{
/**
* Make a new component instance.
*/
public static function make(ComponentInterface|VoidComponentInterface|string ...$children): static;
/**
* Get the children of the component.
*/
public function getChildren(): array;
/**
* Render the component.
*/
public function render(?string $slot = null): string;
}