Skip to content

Theme

<!-- generated:meta -->

Grupui
Planeresource
Spec structThemeSpec

<!-- /generated:meta -->

Kapan Memakai

kind: Theme adalah look & feel — CSS variables dan styling configuration untuk UI.

Kapan memakai Theme:

  • Restyle tampilan pustaka komponen dasar tanpa mengubah semantik layout
  • Per-workspace branding (warna, font)

Kapan TIDAK pakai Theme:

  • Menambah widget baru → daftarkan VisualSpecKind tier component, bukan Theme
  • Mengubah perilaku/visibilitas → itu spec/permission, bukan styling

Sumber kontrak: docs/spec/frontend/05-app-kinds.md §5.

Contoh Manifest

yaml
apiVersion: formspec.dev/v1
kind: Theme
metadata:
  name: ocean-blue
  module: core
spec:
  # CSS variables — lihat ui-theme/ untuk contoh penuh
  tokens:
    --color-primary: "#2563eb"
    --radius: "0.5rem"

Atribut

<!-- generated:attributes -->

AtributTipeWajibContohDeskripsi
publicbooleanIf true (default), the theme is active and published in the bundle.
tokensmap
stylesheetstring
widgetsmapbase widget → asset skin

<!-- /generated:attributes -->

Gotchas

Standar terbuka (CC0) dengan implementasi referensi.