← All package workshops
Presentation / INTERACTIVE WORKSHOP

Configure the actual attribution component

SiteCredit v1.0.0

Edit the full explicit payload, compare isolated theme overrides, translate host-owned wording and inspect escaped package markup.

01 / CONFIGURE

Choose a scenario. Change the inputs or build a sequence of commands.

02 / RUN

Execute the installed package against a new fictional example.

03 / INSPECT

Follow the result, actual calls, generated output and integration code.

THE WORKBENCH

Make it your example.

Your server-side changes are temporary. External-service examples use local response fixtures. Start with sample data.

Execution result

Waiting for your first run
No execution yetEdit inputs ↑

Start with a preset, or change the input and run it.

The behavior is the example.

Your result will show the values, decisions and generated output from the actual package.

EXPLORE THE PACKAGE

What you can exercise here.

INTERACTIVE

Actual Blade component

Credit::toArray and SiteCredit constructor/shouldRender/render, all six configuration values, escaping and attribute merging.

INTERACTIVE

Presentation

Three themes, independent override, all six CSS variables through bounded integers/enums/hex colors, and host-supplied English/Spanish/French strings.

HOST INTEGRATION

Vue and production assets

The supplied Vue 3 component and CSS publish/import path are available to host applications; this preview executes Blade.

UNDERSTAND THE BEHAVIOR

A small component still has configuration boundaries.

Render the actual Blade component with editable attribution, themes, safe CSS values and host translations. Inspect effective configuration and escaped output.

01

Configuration and component override differ

The configured theme can be inherit, light or dark. A component override changes the effective theme for this render without mutating shared configuration. Theme comparison renders all three through the actual component.

02

Text is escaped and disabling is real

Name, label and title remain display text. The markup-looking preset must not execute. enabled=false makes shouldRender decline the component; it does not leave a stray interactive credit link.

03

The workshop adds safe public-input admission

The package normally receives trusted PHP configuration. This public host restricts destinations to its displayed allowlist and accepts only bounded alignment, spacing, font sizes and hexadecimal colors. Raw CSS declarations, url(), imports and control-character tricks are rejected before rendering.

04

Translation is supplied by the host

Spanish and French labels are host-owned translations passed into the component. The package has no translation catalog to switch automatically. The destination is shown explicitly; clicking the preview credit does not navigate away from the workshop.

GO FURTHER

Try the boundary cases.

  1. Verify escaping through the real component

    Choose Escaped label and name or put <strong>Studio</strong> in the name. Expected: the preview displays literal text and raw response contains escaped markup, with no extra element or script. Try a quote in title and inspect the same boundary.

  2. Compare override and shared configuration

    Set theme=light and theme_override=dark, then enable compare_themes. Expected: the selected component is dark, configured_theme_after_override remains light, and the comparison includes inherit, light and dark. Reset the override to use configuration again.

  3. Style within the admitted subset

    Change alignment, font size, padding, top margin and foreground/background hex colors. Expected: allowed values render as package CSS variables. In Full example input try a semicolon or url() in a color: the host rejects it rather than permitting a new declaration or browser request.

  4. Localize, disable and inspect the link

    Enable translated label and choose Spanish or French. Expected: label and paragraph language change. Set enabled=false: the component disappears. Restore it and choose an allowed destination; the output identifies its target, while an unsafe javascript URL or unapproved host is rejected.

COMPOSE THE RESPONSIBILITIES

Useful alone.
Better when the boundaries fit.

Site Credit can live in a shared Laravel layout independently of these packages. Attribution policy, approved destinations and public-input admission belong to the host application. The handbook also covers the optional Vue component and CSS build.

Fields Read every API and recipe