Components

Reference for components.


  • Name
    header
    Type
    object
    Description

    The header object containing image for profiles, headline for articles, and various other fields depending on the page format.

For profiles use the image and optional bio fields.

{
  "header": {
    "image": object,
    "bio": string
  }
}

For profiles use the headline and size fields.

{
  "header": {
    "headline": string,
    "size": object
  }
}
  • Name
    image
    Type
    object
    Description

    The image object containing src and alt fields for a profile page.

{
  "image": {
    "src": string,
    "alt": string
  }
}
  • Name
    bio
    Type
    string
    Description

    The optional bio string for a profile page.

{ "bio": string }
  • Name
    headline
    Type
    string
    Description

    The headline string for an article page.

{ "headline": "Article Title Headline" }
  • Name
    size
    Type
    object
    Description

    The desktop and mobile text px size for the headline of an article page.

{
  "size": {
    "desktop": number,
    "mobile": number
  }
}

blocks

  • Name
    blocks
    Type
    array
    Description

    The blocks array contains types of modules.

{ "blocks": array }

Block format

  • Name
    module
    Type
    object
    Description

    An example of how a component block should be formatted.

{
  "type": string,
  "attributes": object,
  "value": string
}

button

  • Name
    module
    Type
    object
    Description

    Button block object. The value field must be plain text.

{
  "type": "button",
  "attributes": {
    "style": string,
    "url": string,
    "target": string
  },
  "value": "Button Text"
}
  • Name
    style
    Type
    string
    Description

    The style of a button.

{ "style": "primary" || "secondary" || "link" }
  • Name
    url
    Type
    string
    Description

    The url of a button.

{ "url": "https://lens.page" }
  • Name
    target
    Type
    string
    Description

    The target of a button. '_self' opens link in same tab and '_blank' opens button in a new tab.

{ "target": "_self" || "_blank" }

image

  • Name
    module
    Type
    object
    Description

    Image block object. The value field must be the src url of the image.

{
  "type": "image",
  "attributes": {
    "alt": string,
    "caption": string,
    "bleed": boolean
  },
  "value": "src-url-to-image"
}
  • Name
    alt
    Type
    string
    Description

    The alternative image text.

{ "alt": "Alternative image text" }
  • Name
    caption
    Type
    string
    Description

    Optional field for the image caption. If this field is absent then no caption is shown below the image.

{ "caption": "Optional image caption" }
  • Name
    bleed
    Type
    boolean
    Description

    The bleed boolean for if the image should expand to the edge of the window using 'false' or include padding using 'true'.

{ "bleed": false }

paragraph

  • Name
    module
    Type
    object
    Description

    Paragraph block object. The value field must be plain text.

{
  "type": "paragraph",
  "value": "Paragraph text."
}

embed

  • Name
    module
    Type
    object
    Description

    Embed block object. The value field must be the src url of embed. The src value for an embed is labeled src in the embed code that is copied.

{
  "type": "embed",
  "attributes": {
    "ratio": number,
    "height": number,
    "bleed": boolean
  },
  "value": "src-url-to-embed"
}
  • Name
    ratio
    Type
    number
    Description

    The aspect ratio of the embed. Must choose to use either ratio or height field.

{ "ratio": 1.777777777777778 }
  • Name
    height
    Type
    number
    Description

    The px height of the embed. Must choose to use either ratio or height field.

{ "height": number }
  • Name
    bleed
    Type
    boolean
    Description

    The bleed boolean for if the embed should expand to the edge of the window using 'false' or include padding using 'true'.

{ "bleed": true }

  • Name
    module
    Type
    object
    Description

    Blink block object. The value field must be the blink url. A Solana RPC API is required.

{
  "type": "blink",
  "attributes": {
    "api": string,
    "hide": {
      "title": boolean,
      "description": boolean
    }
  },
  "value": "blink-url"
}
  • Name
    api
    Type
    string
    Description

    The Solana RPC API used for the blink. You should configured this API to only work with the page URL the blink exists on.

{ "api": "https://mainnet.helius-rpc.com/?api-key=123-123-123" }
  • Name
    title
    Type
    boolean
    Description

    Hide the title of the blink.

{ "title": true }
  • Name
    description
    Type
    boolean
    Description

    Hide the description of the blink.

{ "description": true }

break

  • Name
    break
    Type
    boolean
    Description

    The break attribute is optional and always set to 'false'. If break is 'true', additional spacing is added below the block. This can be included to any type of block attributes.

{
  "attributes": {
    "break": true
  }
}

Was this page helpful?