Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

Add component descriptions (#2196)

Oleg Isonend2bb3dc0a34b
diff --git a/packages/sdk-components-react-radix/src/accordion.ws.ts b/packages/sdk-components-react-radix/src/accordion.ws.ts
index 35a9ee40dd..42ad1cd2a0 100644
--- a/packages/sdk-components-react-radix/src/accordion.ws.ts
+++ b/packages/sdk-components-react-radix/src/accordion.ws.ts
@@ -124,6 +124,8 @@ export const metaAccordion: WsComponentMeta = {
type: "container",
icon: AccordionIcon,
presetStyle,
+ description:
+ "A vertically stacked set of interactive headings that each reveal an associated section of content. Clicking on the heading will open the item and close other items.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-radix/src/checkbox.ws.ts b/packages/sdk-components-react-radix/src/checkbox.ws.ts
index f01bd8478c..730a5bf13d 100644
--- a/packages/sdk-components-react-radix/src/checkbox.ws.ts
+++ b/packages/sdk-components-react-radix/src/checkbox.ws.ts
@@ -21,6 +21,8 @@ export const metaCheckbox: WsComponentMeta = {
order: 101,
type: "container",
icon: CheckboxCheckedIcon,
+ description:
+ "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
states: [
...defaultStates,
{
diff --git a/packages/sdk-components-react-radix/src/collapsible.ws.ts b/packages/sdk-components-react-radix/src/collapsible.ws.ts
index 9a06483b53..4832eb21d3 100644
--- a/packages/sdk-components-react-radix/src/collapsible.ws.ts
+++ b/packages/sdk-components-react-radix/src/collapsible.ws.ts
@@ -26,6 +26,8 @@ export const metaCollapsible: WsComponentMeta = {
type: "container",
presetStyle,
icon: CollapsibleIcon,
+ description:
+ "An interactive component which expands and collapses some content, triggered by a button.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-radix/src/dialog.ws.tsx b/packages/sdk-components-react-radix/src/dialog.ws.tsx
index 04eadbdd5a..ca2508df35 100644
--- a/packages/sdk-components-react-radix/src/dialog.ws.tsx
+++ b/packages/sdk-components-react-radix/src/dialog.ws.tsx
@@ -102,6 +102,8 @@ export const metaDialog: WsComponentMeta = {
type: "container",
icon: DialogIcon,
stylable: false,
+ description:
+ "Displays content with an overlay that covers the window, triggered by a button. Clicking the overlay will close the dialog.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-radix/src/label.ws.ts b/packages/sdk-components-react-radix/src/label.ws.ts
index 0a2f9ea12e..3fb3e2e203 100644
--- a/packages/sdk-components-react-radix/src/label.ws.ts
+++ b/packages/sdk-components-react-radix/src/label.ws.ts
@@ -20,6 +20,8 @@ export const meta: WsComponentMeta = {
icon: LabelIcon,
presetStyle,
states: defaultStates,
+ description:
+ "An accessible label to describe the purpose of an input. Match the “For” property on the label with the “ID” of the input to connect them.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-radix/src/navigation-menu.ws.ts b/packages/sdk-components-react-radix/src/navigation-menu.ws.ts
index c4adfb703c..24d28fec87 100644
--- a/packages/sdk-components-react-radix/src/navigation-menu.ws.ts
+++ b/packages/sdk-components-react-radix/src/navigation-menu.ws.ts
@@ -306,6 +306,7 @@ export const metaNavigationMenu: WsComponentMeta = {
category: "radix",
order: 2,
type: "container",
+ description: "A collection of links for navigating websites.",
icon: NavigationMenuIcon,
presetStyle,
diff --git a/packages/sdk-components-react-radix/src/popover.ws.tsx b/packages/sdk-components-react-radix/src/popover.ws.tsx
index 05268ca60f..0afe468ccf 100644
--- a/packages/sdk-components-react-radix/src/popover.ws.tsx
+++ b/packages/sdk-components-react-radix/src/popover.ws.tsx
@@ -48,6 +48,7 @@ export const metaPopover: WsComponentMeta = {
type: "container",
icon: PopoverIcon,
stylable: false,
+ description: "Displays rich content in a portal, triggered by a button.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-radix/src/radio-group.ws.ts b/packages/sdk-components-react-radix/src/radio-group.ws.ts
index 2012b35514..9458a229d1 100644
--- a/packages/sdk-components-react-radix/src/radio-group.ws.ts
+++ b/packages/sdk-components-react-radix/src/radio-group.ws.ts
@@ -86,6 +86,8 @@ export const metaRadioGroup: WsComponentMeta = {
category: "radix",
order: 100,
type: "container",
+ description:
+ "A set of checkable buttons—known as radio buttons—where no more than one of the buttons can be checked at a time.",
icon: RadioCheckedIcon,
states: [
...defaultStates,
diff --git a/packages/sdk-components-react-radix/src/select.ws.ts b/packages/sdk-components-react-radix/src/select.ws.ts
index 7e290195d1..7d0c0359bf 100644
--- a/packages/sdk-components-react-radix/src/select.ws.ts
+++ b/packages/sdk-components-react-radix/src/select.ws.ts
@@ -108,6 +108,8 @@ export const metaSelect: WsComponentMeta = {
type: "container",
icon: SelectIcon,
stylable: false,
+ description:
+ "Use within a form to give your users a list of options to choose from.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-radix/src/sheet.ws.tsx b/packages/sdk-components-react-radix/src/sheet.ws.tsx
index d6cd04dcbd..5ae1dfe18d 100644
--- a/packages/sdk-components-react-radix/src/sheet.ws.tsx
+++ b/packages/sdk-components-react-radix/src/sheet.ws.tsx
@@ -17,6 +17,8 @@ export const meta: WsComponentMeta = {
type: "container",
icon: HamburgerMenuIcon,
stylable: false,
+ description:
+ "Displays content in a menu that slides out from the side of the screen, triggered by a button. Use this component for a typical mobile hamburger menu.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-radix/src/switch.ws.ts b/packages/sdk-components-react-radix/src/switch.ws.ts
index 4c4bfa02b8..b46106b686 100644
--- a/packages/sdk-components-react-radix/src/switch.ws.ts
+++ b/packages/sdk-components-react-radix/src/switch.ws.ts
@@ -13,6 +13,8 @@ export const metaSwitch: WsComponentMeta = {
category: "radix",
order: 11,
type: "container",
+ description:
+ "A control that allows the user to toggle between checked and not checked.",
icon: SwitchIcon,
states: [
...defaultStates,
diff --git a/packages/sdk-components-react-radix/src/tabs.ws.ts b/packages/sdk-components-react-radix/src/tabs.ws.ts
index ee10ff3e7a..9598e171d1 100644
--- a/packages/sdk-components-react-radix/src/tabs.ws.ts
+++ b/packages/sdk-components-react-radix/src/tabs.ws.ts
@@ -72,6 +72,8 @@ export const metaTabs: WsComponentMeta = {
type: "container",
icon: TabsIcon,
presetStyle,
+ description:
+ "A set of panels with content that are displayed one at a time. Duplicate both a tab trigger and tab content to add more tabs. Triggers and content are connected according to their order in the Navigator.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-radix/src/tooltip.ws.tsx b/packages/sdk-components-react-radix/src/tooltip.ws.tsx
index d677f7505b..564204ff86 100644
--- a/packages/sdk-components-react-radix/src/tooltip.ws.tsx
+++ b/packages/sdk-components-react-radix/src/tooltip.ws.tsx
@@ -48,6 +48,8 @@ export const metaTooltip: WsComponentMeta = {
type: "container",
icon: TooltipIcon,
stylable: false,
+ description:
+ "Displays content that is related to the trigger, when the trigger is hovered with the mouse or focused with the keyboard. You are reading an example of a tooltip right now.",
template: [
{
type: "instance",
diff --git a/packages/sdk-components-react-remix/src/form.ws.tsx b/packages/sdk-components-react-remix/src/form.ws.tsx
index e7997f9805..b1b74c9c82 100644
--- a/packages/sdk-components-react-remix/src/form.ws.tsx
+++ b/packages/sdk-components-react-remix/src/form.ws.tsx
@@ -21,6 +21,7 @@ export const meta: WsComponentMeta = {
type: "container",
invalidAncestors: ["Form"],
label: "Form",
+ description: "Collect information from your users using validation rules.",
icon: FormIcon,
presetStyle,
order: 0,
diff --git a/packages/sdk-components-react/src/blockquote.ws.tsx b/packages/sdk-components-react/src/blockquote.ws.tsx
index f49b930c96..f3767c90ac 100644
--- a/packages/sdk-components-react/src/blockquote.ws.tsx
+++ b/packages/sdk-components-react/src/blockquote.ws.tsx
@@ -63,6 +63,8 @@ export const meta: WsComponentMeta = {
category: "text",
type: "container",
label: "Blockquote",
+ description:
+ "Use to style a quote from an external source like an article or book.",
icon: BlockquoteIcon,
states: defaultStates,
presetStyle,
diff --git a/packages/sdk-components-react/src/box.ws.ts b/packages/sdk-components-react/src/box.ws.ts
index fcaecea93d..8a2cab8a1b 100644
--- a/packages/sdk-components-react/src/box.ws.ts
+++ b/packages/sdk-components-react/src/box.ws.ts
@@ -40,6 +40,8 @@ export const meta: WsComponentMeta = {
category: "general",
type: "container",
label: "Box",
+ description:
+ "A container for content. By default this is a Div, but the tag can be changed in settings.",
icon: BoxIcon,
states: defaultStates,
presetStyle,
diff --git a/packages/sdk-components-react/src/button.ws.tsx b/packages/sdk-components-react/src/button.ws.tsx
index dbd4c3b9e0..9ae02710e0 100644
--- a/packages/sdk-components-react/src/button.ws.tsx
+++ b/packages/sdk-components-react/src/button.ws.tsx
@@ -18,6 +18,8 @@ export const meta: WsComponentMeta = {
type: "container",
invalidAncestors: ["Button"],
label: "Button",
+ description:
+ "Use a button to submit forms or trigger actions within a page. Do not use a button to navigate users to another resource or another page - that’s what a link is used for.",
icon: ButtonElementIcon,
presetStyle,
states: [
diff --git a/packages/sdk-components-react/src/checkbox.ws.tsx b/packages/sdk-components-react/src/checkbox.ws.tsx
index a54a1f6b3d..3f4ab728ad 100644
--- a/packages/sdk-components-react/src/checkbox.ws.tsx
+++ b/packages/sdk-components-react/src/checkbox.ws.tsx
@@ -24,6 +24,8 @@ export const meta: WsComponentMeta = {
invalidAncestors: ["Button"],
type: "control",
label: "Checkbox",
+ description:
+ "Use within a form to allow your users to toggle between checked and not checked. Group checkboxes by matching their “Name” properties. Unlike radios, any number of checkboxes in a group can be checked.",
icon: CheckboxCheckedIcon,
presetStyle,
order: 6,
diff --git a/packages/sdk-components-react/src/code-text.ws.tsx b/packages/sdk-components-react/src/code-text.ws.tsx
index 931fda0c23..efa80c7338 100644
--- a/packages/sdk-components-react/src/code-text.ws.tsx
+++ b/packages/sdk-components-react/src/code-text.ws.tsx
@@ -39,6 +39,8 @@ export const meta: WsComponentMeta = {
category: "general",
type: "container",
label: "Code Text",
+ description:
+ "Use this component when you want to display code as text on the page.",
icon: CodeTextIcon,
invalidAncestors: ["CodeText"],
states: defaultStates,
diff --git a/packages/sdk-components-react/src/form.ws.tsx b/packages/sdk-components-react/src/form.ws.tsx
index 67ae7d159e..40545b2f3d 100644
--- a/packages/sdk-components-react/src/form.ws.tsx
+++ b/packages/sdk-components-react/src/form.ws.tsx
@@ -21,6 +21,7 @@ export const meta: WsComponentMeta = {
type: "container",
invalidAncestors: ["Form"],
label: "Form",
+ description: "Collect information from your users using validation rules.",
icon: FormIcon,
states: defaultStates,
presetStyle,
diff --git a/packages/sdk-components-react/src/heading.ws.tsx b/packages/sdk-components-react/src/heading.ws.tsx
index cf9433cc46..138c895700 100644
--- a/packages/sdk-components-react/src/heading.ws.tsx
+++ b/packages/sdk-components-react/src/heading.ws.tsx
@@ -25,6 +25,8 @@ export const meta: WsComponentMeta = {
category: "text",
type: "container",
label: "Heading",
+ description:
+ "Use HTML headings to structure and organize content. Use the Tag property in settings to change the heading level (h1-h6).",
icon: HeadingIcon,
invalidAncestors: ["Heading"],
states: defaultStates,
diff --git a/packages/sdk-components-react/src/html-embed.ws.ts b/packages/sdk-components-react/src/html-embed.ws.ts
index 8df054fedd..3e6148dc3e 100644
--- a/packages/sdk-components-react/src/html-embed.ws.ts
+++ b/packages/sdk-components-react/src/html-embed.ws.ts
@@ -9,6 +9,7 @@ export const meta: WsComponentMeta = {
category: "general",
type: "embed",
label: "HTML Embed",
+ description: "Used to add HTML code to the page, such as an SVG or script.",
icon: EmbedIcon,
stylable: false,
order: 7,
diff --git a/packages/sdk-components-react/src/image.ws.tsx b/packages/sdk-components-react/src/image.ws.tsx
index 5e5dc98486..5ba0e18157 100644
--- a/packages/sdk-components-react/src/image.ws.tsx
+++ b/packages/sdk-components-react/src/image.ws.tsx
@@ -31,6 +31,8 @@ export const meta: WsComponentMeta = {
category: "media",
type: "embed",
label: "Image",
+ description:
+ "Add an image asset to the page. Webstudio automatically converts images to WebP or AVIF format and makes them responsive for best performance.",
icon: ImageIcon,
states: defaultStates,
presetStyle,
diff --git a/packages/sdk-components-react/src/input.ws.tsx b/packages/sdk-components-react/src/input.ws.tsx
index 236fd53a3b..253a13d5e3 100644
--- a/packages/sdk-components-react/src/input.ws.tsx
+++ b/packages/sdk-components-react/src/input.ws.tsx
@@ -24,6 +24,8 @@ export const meta: WsComponentMeta = {
invalidAncestors: ["Button"],
type: "control",
label: "Text Input",
+ description:
+ "A single-line text input for collecting string data from your users.",
icon: FormTextFieldIcon,
presetStyle,
order: 3,
diff --git a/packages/sdk-components-react/src/link.ws.tsx b/packages/sdk-components-react/src/link.ws.tsx
index 0ef33e4882..a601625f83 100644
--- a/packages/sdk-components-react/src/link.ws.tsx
+++ b/packages/sdk-components-react/src/link.ws.tsx
@@ -27,6 +27,8 @@ export const meta: WsComponentMeta = {
category: "general",
type: "container",
label: "Link",
+ description:
+ "Use a link to send your users to another page, section, or resource. Configure links in the Settings panel.",
icon: LinkIcon,
invalidAncestors: ["Link"],
presetStyle,
diff --git a/packages/sdk-components-react/src/list-item.ws.tsx b/packages/sdk-components-react/src/list-item.ws.tsx
index 4414638105..3f7dcb0e7e 100644
--- a/packages/sdk-components-react/src/list-item.ws.tsx
+++ b/packages/sdk-components-react/src/list-item.ws.tsx
@@ -18,6 +18,7 @@ export const meta: WsComponentMeta = {
type: "container",
requiredAncestors: ["List"],
label: "List Item",
+ description: "Adds a new item to an existing list.",
icon: ListItemIcon,
states: defaultStates,
presetStyle,
diff --git a/packages/sdk-components-react/src/list.ws.tsx b/packages/sdk-components-react/src/list.ws.tsx
index d839f90d79..260e0cbc9f 100644
--- a/packages/sdk-components-react/src/list.ws.tsx
+++ b/packages/sdk-components-react/src/list.ws.tsx
@@ -46,6 +46,7 @@ export const meta: WsComponentMeta = {
category: "general",
type: "container",
label: "List",
+ description: "Groups content, like links in a menu or steps in a recipe.",
icon: ListIcon,
states: defaultStates,
presetStyle,
diff --git a/packages/sdk-components-react/src/paragraph.ws.tsx b/packages/sdk-components-react/src/paragraph.ws.tsx
index f6220f09fa..22dcc18032 100644
--- a/packages/sdk-components-react/src/paragraph.ws.tsx
+++ b/packages/sdk-components-react/src/paragraph.ws.tsx
@@ -17,6 +17,7 @@ export const meta: WsComponentMeta = {
category: "text",
type: "container",
label: "Paragraph",
+ description: "A container for multi-line text.",
icon: TextAlignLeftIcon,
invalidAncestors: ["Paragraph"],
states: defaultStates,
diff --git a/packages/sdk-components-react/src/radio-button.ws.tsx b/packages/sdk-components-react/src/radio-button.ws.tsx
index 4446121a69..fb554afcce 100644
--- a/packages/sdk-components-react/src/radio-button.ws.tsx
+++ b/packages/sdk-components-react/src/radio-button.ws.tsx
@@ -24,6 +24,8 @@ export const meta: WsComponentMeta = {
invalidAncestors: ["Button"],
type: "control",
label: "Radio",
+ description:
+ "Use within a form to allow your users to select a single option from a set of mutually exclusive choices. Group multiple radios by matching their “Name” properties.",
icon: RadioCheckedIcon,
presetStyle,
order: 5,
diff --git a/packages/sdk-components-react/src/separator.ws.tsx b/packages/sdk-components-react/src/separator.ws.tsx
index 5ef3b89838..63fa6b3ffc 100644
--- a/packages/sdk-components-react/src/separator.ws.tsx
+++ b/packages/sdk-components-react/src/separator.ws.tsx
@@ -44,6 +44,8 @@ export const meta: WsComponentMeta = {
category: "general",
type: "embed",
label: "Separator",
+ description:
+ "Used to visually divide sections of content, helping to improve readability and organization within a webpage.",
icon: DashIcon,
states: defaultStates,
presetStyle,
diff --git a/packages/sdk-components-react/src/text.ws.tsx b/packages/sdk-components-react/src/text.ws.tsx
index 58233fe24a..965dcf4e08 100644
--- a/packages/sdk-components-react/src/text.ws.tsx
+++ b/packages/sdk-components-react/src/text.ws.tsx
@@ -23,6 +23,8 @@ export const meta: WsComponentMeta = {
category: "text",
type: "container",
label: "Text",
+ description:
+ "A generic container for any text content that is not a heading or a link.",
icon: TextIcon,
states: defaultStates,
presetStyle,
diff --git a/packages/sdk-components-react/src/textarea.ws.tsx b/packages/sdk-components-react/src/textarea.ws.tsx
index 7b7aeb8921..bafafc02fe 100644
--- a/packages/sdk-components-react/src/textarea.ws.tsx
+++ b/packages/sdk-components-react/src/textarea.ws.tsx
@@ -25,6 +25,8 @@ export const meta: WsComponentMeta = {
category: "forms",
type: "control",
label: "Text Area",
+ description:
+ "A multi-line text input for collecting longer string data from your users.",
icon: FormTextAreaIcon,
presetStyle,
order: 4,
diff --git a/packages/sdk-components-react/src/vimeo.ws.ts b/packages/sdk-components-react/src/vimeo.ws.ts
index ce16dc713e..b9ee2c6436 100644
--- a/packages/sdk-components-react/src/vimeo.ws.ts
+++ b/packages/sdk-components-react/src/vimeo.ws.ts
@@ -18,6 +18,8 @@ export const meta: WsComponentMeta = {
category: "media",
type: "container",
label: "Vimeo",
+ description:
+ "Add a video to your page that is hosted on Vimeo. Paste a Vimeo URL and configure the video in the Settings tab.",
order: 1,
icon: VimeoIcon,
states: defaultStates,