Skip to content
pinegrow.com
Docs menuPiny

Piny

Learn how to install and use Piny.

On this page

Installation

Piny is an extension for Visual Studio Code, Cursor, Windsurf and other IDEs based on Visual Studio Code.

Open the Extensions panel and search for Piny, then install the extension.

Keep Update checked so you always have the latest version.

Piny requires that at least one folder is open in the editor Workspace. Otherwise Piny will not open and an error message is shown.

To open Piny, right-click anywhere in the code and choose Edit in Piny.

Code editor with a React Hero component open and a context menu showing the Edit in Piny command highlighted.

Use Visual Studio Code settings to assign a keyboard shortcut to that command.

Keyboard Shortcuts tab filtered to Piny, showing Edit in Piny bound to Command Y and Reload Piny bound to Command F10.

You can freely switch away from the Piny tab - the editor state is preserved. Close the tab when you’re done; reopen it any time with Edit in Piny.

Code editor with a Bye bye, Piny callout pointing to the close button of the Piny tab beside the Hero component tree.

Preview

Piny shows a responsive browser preview of your project.

Piny preview of a Radiant landing page at 768 px, with the component tree listing Hero, Gradient, Container, Navbar and buttons.

Use the route dropdown to add and select a route displayed in the preview.

Piny preview route dropdown listing the routes /, /blog, /company, /login, /pricing and /studio, with an arrow pointing to it.

Piny Pro: when Visual Select is active, Piny tracks visited routes and lists them in the route menu.

If you don’t need the preview, hide it with the icon in the preview toolbar.

Piny preview toolbar at 768 px with a Hide preview callout pointing to its close button.

To get it back click on the collapsed Preview.

Collapsed Pinegrow preview panel on the right, with Visual, Inspector and AI tabs and a callout reading Click to show preview.

In the Preview toolbar you can also set the zoom level and reload the preview.

Pinegrow preview of a Radiant landing page at 30 percent zoom, with callouts pointing to the Zoom control and the Reload button.

Selecting Components and Elements

One component can be edited at a time. Its JSX structure appears in the Tree panel.

Pinegrow Tree panel listing the nested elements of the Hero component, such as Gradient, Container, Navbar, h1 and Button.

Select a JSX element or string in one of three ways:

Place the cursor in the code (the element under the cursor is selected) or click the element in the Tree panel.

Code editor beside the Pinegrow tree with the h1 heading selected, the matching code line highlighted in page.tsx.

Use Visual Select (Piny Pro) to click elements directly in the preview.

Pinegrow preview of a Hero section with the Close every deal heading selected, and a Click here callout pointing to it.

With Piny Pro you can multi-select elements: Ctrl/Cmd + Click to add or remove, Shift + Click to select a range.

Pinegrow Tree panel with several stat items selected together, highlighted in blue in the tree and in the /company preview.

If the cursor is inside a string (for example a class list), a special “Code” element is selected; you can still edit Tailwind classes via Visual Controls and Inspector.

Code editor with button.tsx open beside the Pinegrow Inspector listing the classes of a button, with Add class and Add state buttons.

Visual Controls

Visual Controls let you edit Tailwind styling for the selected element.

Pinegrow Visual panel Text section with the Color field set to text-slate-950 and Weight set to semibold.

Choose a screen-size tab (right-click to also resize the preview).

Pinegrow Visual panel with the breakpoint buttons ALL, SM, MD, LG, XL and 2XL, and a callout reading 768px and up.

Use the States dropdown to pick a state (hover, focus, active…).

Pinegrow Visual panel with the hover state chip added in the pseudo class field, and an arrow pointing to it.

This opens up the states menu:

Pinegrow state dropdown listing None, Custom state, frequently used states hover, focus and active, and all states such as after and before.

Your edits apply to the current size × state combination. Changes are written straight to code and saved automatically; rely on git and Undo to discard unwanted edits.

For complex combinations, use the Inspector.

Inspector

Inspector shows Tailwind classes of the selected element and its parents in an editable tree - ideal for visualizing and tweaking complex styles.

Pinegrow Inspector showing the classes of a dl element grouped by breakpoint and state, including sm grid-cols-2 and hover bg-stone-200.

Click a class to change its value.

Pinegrow Inspector dropdown for a dl element's grid columns, listing values 1 to 7 with 1 checked.

Uncheck the class to toggle visibility.

Pinegrow Inspector with the grid-cols-1 class unchecked and gap-x-8 checked, showing class toggles on a dl element.

Add classes or states from the menus or with smart search.

Pinegrow Add class menu on a dl element listing style categories such as Text, Margin and Padding, Display, Position and Background.

Add states with the states menu.

Pinegrow Add state menu listing screen sizes, frequently used states hover, focus and active, and all states, with a Click to add a state callout.

Click on states to edit them. Selecting a different state will combine the original state with the selected state (unless you are selecting a different screen size).

Right-click classes to move or duplicate them to another state; duplicate is handy for responsive overrides.

Pinegrow Inspector context menu on the grid-cols-1 class of a dl element, offering Move to state, Duplicate to state and Swap colors.

Drag numeric sliders or use the color picker for custom values.

Pinegrow Inspector listing h1 classes such as text-balance and text-6xl/[1.8], with a callout reading Scrub custom values.

Narrow down properties with the search bar.

Pinegrow Inspector class search for pb showing suggested padding classes pb-24, pb-32 and pb-48 with sm and md breakpoint tags.

Components Bar

The components bar above the preview lets you quickly switch between components.

Pinegrow Components Bar breadcrumb showing RootLayout, Home, Hero and LogoCloud, with the LogoCloud element tree below.

It works in two modes:

  • When Visual select is disabled, the bar shows a list of recently viewed components.
  • With Visual select enabled, the bar shows the selected component and its parents, like breadcrumbs.

Click on a component to select it in Piny and in the code.

Pinegrow Components Bar with the Hero breadcrumb highlighted and a Click to edit component callout pointing to it.

Use the dropdown menu to:

  • Ignore the component in Visual select (prevents drilling down into the components, will be explained in detail in the chapter about Visual select).
  • Assign a route to the component. Whenever the component will be selected, the preview will show the associated route.
Hero breadcrumb dropdown listing Ignore in visual select, route options with / checked, /blog, /company and /login, and Edit route.

AI Assistant

After activating the AI Assistant in Settings - with your own API key for any OpenAI compatible endpoint - you can use the assistant in two ways:

Drag & Drop

Click on the Insert button to open the insert panel where you describe the feature, optionally select a referenced component, and than drag it to the desired place in the Tree panel.

Pinegrow Insert element panel with the prompt 'A badge with the special offer' and a Drag me to the page callout below it.

This triggers a command in the AI panel where you can followup with further requests.

AI Panel

Use chat interface to guide the AI Assistant.

Pinegrow AI panel with the request make it pop, next to the updated Radiant hero preview with a new sales pipeline headline.

Use one of the available actions:

  • Project will do project-wide changes with the ability to read and write multiple files. This action can use up a lot of tokens. Use it for complex tasks such as refactoring components, adding features that span multiple files.
  • Selected code transforms only the selected code (or selected JSX element) without getting any context of the surrounding code. It is very cost and time efficient and perfect for styling elements and doing changes that only affect the selected element.
  • Just chatting has no effect on the code.
Empty Pinegrow AI task box with a callout asking the user to select what kind of task they are doing, beside the New task and Project buttons.

AI Assistant settings let you designate two models as the quick and the smart model.

Use the Smart toggle to quickly switch between them.

Pinegrow AI task box containing the request to add a pricing table from e-commerce API sources, with SMART and SOURCES toggles on.

Sources toggle lets you insert one or more knowledge sources into the prompt. Right-click on Sources to manage them.

Visual Select

Click on elements in the preview to select them in Piny and in the code.

Pinegrow preview of a Radiant hero with the h1 heading selected and a Click to select elements in the preview callout.

Visual select requires a small script to be inserted into the layout of your project. The script is only inserted in development mode and has no effect unless the project is viewed through Piny.

At the moment React Vite projects and Next.js projects are supported.

Follow the specific instructions provided in Settings to enable Visual select in your project.

Pinegrow Project Settings dialog with the Source folders field and the Visual selection option highlighted with Show setup instructions.

Use the Click to Select button to switch between visually selecting elements and interacting with your app. 

Pinegrow toolbar with the Click to select button and a callout reading Click to enable and disable visual select.

Activating the Click to Select button also refreshes the DOM mapping, so that’s the first thing to try in case of any issues.

If selected elements borders and menus get in the way you can toggle them with the visual helpers menu.

Pinegrow visual select options menu with Element outlines, Selected element menu and Selected element border and controls checked.

Check the Ignore in visual select option on individual components, if you are not interested in drilling down into them.

Pinegrow Button breadcrumb dropdown with the Ignore in visual select option checked, shown above the Navigate to route options.

For example, clicking on the button will normally select the Button component itself in Piny and code.

Pinegrow breadcrumb trail RootLayout, Home, Hero, Container and Button, with the Get started button selected in the preview and tree.

But, when Button is ignored, the instances of the button in the components where they are used will be selected instead.

Pinegrow Button breadcrumb with the tree showing Headless.Button and Link, and the Get started button selected in a 480 px mobile preview.

Under the hood, Visual select is doing some advanced DOM to JSX element mapping. This works even for NextJS projects where source mapping information is not always present. That’s why the mapping might not always be 100% accurate. But even in those cases, it will usually select the JSX element that is close to the correct one.

Whole Project Scan & Navigation

Piny can scan the whole project for components, so that it can recognize them during visual select. 

Use the Select tool…

Pinegrow preview at 1024 px with a callout reading Select a component to edit, pointing to the Select button in the Components Bar.

… to quickly jump to any component in the project. 

Pinegrow Select component list in the Components Bar, showing project components such as AnimatedNumber, BentoCard, Blog and Button.

When Visual Select is active, Right-click on the Select to only display components that are visible in the preview.

Also, when Visual Select is active the top bar shows parents of the currently selected component. When Visual Select is off, the recently edited components are shown instead.

Pinegrow Components Bar breadcrumbs RootLayout, Pricing, PricingCards, Container and PricingCard, with the PricingCard tree below.

Drag & Drop tool lets you choose which component you want to add to the layout.

Pinegrow Insert element panel with the Add to page text, the Investors component selected, and the Add to page plus Investors drag item.

Import Tailwind Theme

Piny Pro can automatically import colors, fonts, breakpoints and other visual properties from your Tailwind theme.

Code editor showing tailwind.config.js with a fontFamily entry named display set to Impact and a 4xl border radius.

Once you point it to your Tailwind source files, Visual controls and inspector will reflect your custom theme values.

Pinegrow Visual panel Font dropdown listing sans, serif, mono and display, with display highlighted.

Settings

Some features require a little bit of setup.

Click on the Settings button to open the dialog.

Pinegrow top bar with the Settings button and its 100% zoom badge, highlighted by an arrow above the Visual, Inspector and AI tabs.

Piny tries to auto detect the URL of the development server. In rare cases where that doesn’t work, enter the URL here, under Live preview.

Pinegrow Project Settings Live Preview section with the Preview url field set to http://localhost:3000 and a Test preview button.

Piny’s AI assistant works with multiple AI providers and your own API keys. Open AI Assistant Settings to activate providers and choose a Quick and Smart models. 

Pinegrow Project Settings Smart Insert and AI Assistant section with a project brief for a Next.js consulting agency landing page.

Use Project Brief field to enter any custom instructions for the current project. 

You can also define Knowledge Sources that can then be included in AI Assistant prompts.

If you don’t need Piny’s AI Assistant select this checkbox and the AI panel will be hidden.

To import your custom Tailwind theme, point Piny to the Tailwind config and source file. For Tailwind 4 only the source file is required.

Pinegrow Project Settings Import your Tailwind CSS config section with the config file tailwind.config.js and source CSS file src/styles/tailwind.css.

Source folders contain a list of project folders that Piny scans for components. By default, src, pages and components folders are scanned.

Pinegrow Project Settings Source folders field with src, pages and components listed as scanned folders.

For very large projects, it makes sense to only enter specific folders that contain subset of components that you are actively working on.

Visual Select requires that a small script is included in the layout of your project.

Follow the setup instructions to do that.

Pinegrow Project Settings Visual Selection steps for a Next.js project, including PINY_VISUAL_SELECT=true in .env.local.

The point is to include the Piny script in the layout, but only in development mode, and to optionally toggle it with an environment setting. But even if the script is included, it is only activated when the preview runs in Piny.

Not all build methods are supported yet. Let me know what you are using so that we can prioritize implementing the support for most commonly used stacks.

The Piny UI is fully customizable. Use the Workspace menu to save and restore panel positions. That’s also useful if the workspace gets messed up.

Pinegrow Workspace menu open beside Manage your license, listing Default and Save the current layout options under My layouts.

And, finally, use Manage License dialog to buy and activate your Piny PRO license.

Pinegrow top bar with an arrow pointing to the Manage your license button next to the Workspace menu and Settings.

In this section

  • Piny setup: before you begin

    Piny runs directly in your IDE to visually edit Tailwind styling in Astro, React, and Next.js projects. Unlike Pinegrow Web Editor, Piny integrates with VS Code for dynamic…

Was this page helpful?