Skip to main content

Documentation Index

Fetch the complete documentation index at: https://makeswift-sasha-eng-8460-create-a-guide-for-troubleshooting.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Params

label
string
default:"On click"
Text for the panel label in the Makeswift builder.

Prop type

The Link control passes an object of type LinkValue to your component.
type LinkValue = {
  href: string
  target?: "_blank" | "_self"
}
If no value is set in the builder, your component receives { href: '#' }.

Example

The following example adds an Link control to the link prop of a Button component.
import { Link } from "@makeswift/runtime/controls"

import { runtime } from "@/makeswift/runtime"

import { Button } from "./Button"

runtime.registerComponent(Button, {
  type: "button",
  label: "Button",
  props: {
    link: Link(),
  },
})
.makeswift.ts is a naming convention for organizing Makeswift registration code. Learn more.