Skip to main content
Mikael_Ahlstrom
July 1, 2024

Create dividers with Plugin API – figma.createDivider()?

  • July 1, 2024
  • 15 replies
  • 412 views

I have built a simple plugin for my organization to generate our best practice Figma file boilerplate. I would love to be able to take advantage of the new page dividers feature, but if I use the API to edit the name of the page to something like ‘—’ it doesn’t turn into a divider like it would from the UI.

Feature requests

  1. Add ability to create dividers — Figma.createDivider()?
  2. Turn pages to divider if name is changed to “—” or similar like in UI

CleanShot 2024-07-01 at 11.18.45

15 replies

Andrey_Cretsu
New Member
July 1, 2024

same situation

Andrey_Cretsu
New Member
July 1, 2024

@Mikael_Ahlstrom trying to do same goal plugin, could you tell me please how you replace first page, precreated when you open new file?

Mikael_Ahlstrom
July 1, 2024

@Andrey_Cretsu I don’t think you can with the API. I’m just keeping the Page 1 to be deleted manually.

Mikael_Ahlstrom
July 1, 2024

@Andrey_Cretsu you actually can rename existing pages. Here’s my entire TypeScript file with renaming.

Pastebin

Andrey_Cretsu
New Member
July 1, 2024
Andrey_Cretsu
New Member
July 1, 2024

@Mik thank you, I’ll check your code

Andrey_Cretsu
New Member
July 1, 2024

@Mikael_Ahlstrom I receive an error with your code about “includes”

Lenin
New Participant
July 15, 2024

Would be nice to have this als available from the api 😁.

Perhaps @Gleb could bring this up to the Figma team 😬

Gleb
Power Member
July 15, 2024

I don’t work for Figma

You can bring this to the team yourself by posting on discord.

Lenin
New Participant
July 15, 2024

My bad i thought you were part of Figma 😅 . I’ll will be going in search of Figma’s discord