GitHub

CMS Panel

An interactive admin panel component for simulating and previewing CMS field configurations. Useful for testing how content editors interact with components.

Loading...

Installation

pnpm add @corew500/ui

Usage

import { CMSPanel, CMSPanelField } from "@corew500/ui/cms-panel"
import { Input } from "@corew500/ui/input"

<CMSPanel locale="en" title="Component Fields">
  <CMSPanelField label="Label">
    <Input value={label} onChange={(e) => setLabel(e.target.value)} />
  </CMSPanelField>
</CMSPanel>

With Description

<CMSPanel
  locale="en"
  title="Button Fields"
  description="Configure button appearance for the CMS."
>
  <CMSPanelField label="Label">
    <Input value={label} onChange={(e) => setLabel(e.target.value)} />
  </CMSPanelField>
</CMSPanel>

API Reference

Props

PropTypeDefaultDescription
localestring—The current locale code to display (e.g., 'en', 'fr')
titlestringCMS FieldsCustom title for the panel header (defaults to "CMS Fields")
descriptionstring—Footer description text explaining the demo
sizeenum——

Accessibility

Keyboard Navigation

  • All form controls maintain proper tab order

Additional

  • - Panel is a semantic grouping container
  • Field labels are associated with their inputs

Localization

Translatable Content

  • - Title and description props should contain pre-translated text

Additional

  • Locale badge displays the current content language code

Props

PropTypeDefaultDescription
label*string—Field label
hintstring—Optional field description