Page Structure
Page skeleton: header, footer, hero and field groups.
INFO
Every component also has the common methods (key, visible, class, attributes, view…).
FieldSet
field-setField group (fieldset) that puts related fields under one legend, optionally in columns.
use Cg\ComponentFramework\Component\FieldSet\FieldSet;
use Cg\ComponentFramework\Component\TextInput\TextInput;
FieldSet::make('聯絡資訊', [
TextInput::make('name', '姓名'),
TextInput::make('phone', '電話')->type('tel'),
])->description('只會在出貨時聯絡你')->columns(2);Constructor:FieldSet::make(Htmlable|Closure|string $legend, iterable $components = [])
All methods (6)
components(iterable $components)push(Component $component)description(Htmlable|Closure|string|null $description)disabled(Closure|bool $condition = true)hideLegend(bool $condition = true)columns(int $columns)
Footer
footerPage footer for copyright, links and actions.
use Cg\ComponentFramework\Component\Footer\Footer;
use Cg\ComponentFramework\Component\Link\Link;
Footer::make('© 2026 Acme Inc.')
->columns([
Link::make('隱私權政策', '/privacy'),
Link::make('服務條款', '/terms'),
])
->variant('muted');Constructor:Footer::make(Htmlable|Closure|string|null $copyright = null)
Options
variant():default·muted·dark
All methods (6)
columns(iterable $components)push(Component $component)actions(Actions|Traversable|array $actions)copyright(Htmlable|Closure|string|null $copyright)variant(string $variant)bordered(bool $condition = true)
Header
headerPage header with brand, navigation and actions; can be sticky.
use Cg\ComponentFramework\Component\Header\Header;
use Cg\ComponentFramework\Component\Link\Link;
Header::make()
->brand('Acme', '/')
->content([
Link::make('產品', '/products')->variant('ghost'),
Link::make('價格', '/pricing')->variant('ghost'),
])
->actions([Link::make('登入', '/login')])
->sticky();Constructor:Header::make(Htmlable|Closure|string|null $brand = null)
Options
variant():default·transparent·dark
All methods (8)
brand(Htmlable|Closure|string|null $brand, Closure|string|null $url = null)content(iterable $components)push(Component $component)actions(Actions|Traversable|array $actions)variant(string $variant)sticky(bool $condition = true)bordered(bool $condition = true)compact(bool $condition = true)
Hero
heroHero section: large title, description, media and primary call to action.
use Cg\ComponentFramework\Component\Hero\Hero;
use Cg\ComponentFramework\Component\Link\Link;
Hero::make('讓團隊更快交付')
->eyebrow('新功能')
->description('一個地方管理需求、進度與上線。')
->actions([
Link::make('免費開始', '/register')->variant('solid')->color('primary'),
])
->align('center');Constructor:Hero::make(Htmlable|Closure|string $title)
Options
align():start·centersize():sm·md·lgtone():default·muted·primary·dark
All methods (9)
eyebrow(Htmlable|Closure|string|null $eyebrow)description(Htmlable|Closure|string|null $description)body(mixed $content)media(?Component $media)actions(Actions|Traversable|array $actions)headingLevel(int $level)align(string $alignment)size(string $size)tone(string $tone)
Generated from source by scripts/wiki-components/generate.php; every example is rendered as part of the build.