Skip to main content
Drupal is a registered trademark of Dries Buytaert
Release: OpenID Connect / OAuth client 3.0.0-alpha9 New alpha version released for module openid_connect (3.0.0-alpha9). Usage Milestone: Google Analytics Module google_analytics crossed 1,000 active installs. Release: Timelinr 1.0.1 Minor update available for module timelinr (1.0.1). Release: GraphQL Compose Codegen 1.1.2 Minor update available for module graphql_compose_codegen (1.1.2). Release: Mapy.com 1.1.3 Minor update available for module mapycom (1.1.3). Release: Ckeditor5 entity browser 3.0.3 Minor update available for module ckeditor5_entity_browser (3.0.3). Release: Ckeditor5 entity browser 3.0.1 Minor update available for module ckeditor5_entity_browser (3.0.1). Release: Ckeditor5 entity browser 3.0.2 Minor update available for module ckeditor5_entity_browser (3.0.2). Release: Teamleader Integration 4.0.2 Minor update available for module teamleader (4.0.2). Module Revived: Entityqueue Buttons 1.1.2 Module entityqueue_buttons updated after 8 months of inactivity (1.1.2).

Pinto: Native Components

27 sites Security covered Drupal 10–11 Pinto ecosystem
View on drupal.org

Pinto allows you to define frontend components using plain PHP classes, simplifying the creation and management of reusable UI elements within Drupal. It integrates smoothly with various Drupal systems like controllers, blocks, and layouts, offering a YAML-free alternative to other component management solutions. Pinto also provides helpers for organizing component files, including PHP, Twig, CSS, and JavaScript.

Pinto is a way of defining frontend components with plain PHP. Define components as simple classes, and let Pinto do the rest. Works well with controller/render-arrays, blocks, layouts, entity displays, etc. No fussing with YAML. Some say its a nicer alternative to SDC. Helpers are provided to replicate a "single directory" setup, wherein PHP, Twig, CSS, JS are colocated.

Pinto Documentation

Example

Component class

namespace Drupal\my_site_ds;

class MyComponent {

  use Drupal\pinto\Object\DrupalInvokableSlotsTrait;

  public function __construct(
    public string $str,
    public int $number,
  ) {
  }
  
}

Template

{{ str }}
{{ number }}

Usage

(new MyComponent(
  str: 'Hello world',
  number: 123,
))();

Project

Pinto has adopted zerover. To inspire confidence, you'll find both the Drupal Pinto project and Pinto PHP library have great test coverage, code coverage, and [level 9 PHPStan] static analysis.

Development of core Pinto features happen on GitHub, while the Drupal integration happens on Drupal.org. Each of these projects are completely independent, while the Drupal integration has a dependency on the library.

See also:

Documentation

Official documentation is available at https://pinto.docs.contrib.social/

Read the blog posts on Pinto:

Depends on

Dependencies of the latest stable release

No dependencies recorded for this project.

Required by

3 tracked projects depend on this one

Activity

Tracked releases
21
Tracked since
Oct 2024
Latest release
8 months ago
Releases (12 mo)
7 ▼ from 14
Maintenance
Slowing

Release Timeline

Releases

Version Type Core Release date
0.7.0-beta6 Pre-release 10–11 Dec 22, 2025
0.7.0-beta5 Pre-release 10–11 Dec 21, 2025
0.7.0-beta4 Pre-release 10–11 Dec 20, 2025
0.7.0-beta3 Pre-release 10–11 Dec 19, 2025
0.7.0-beta2 Pre-release 7–11 Dec 17, 2025
0.7.0-beta1 Pre-release 10–11 Dec 11, 2025
0.6.0 Stable 10–11 Nov 6, 2025
0.5.2 Stable 10–11 Aug 7, 2025
0.5.1 Stable 10–11 May 4, 2025
0.5.0 Stable 10–11 Apr 20, 2025
0.4.3 Stable 10–11 Apr 14, 2025
0.4.2 Stable 10–11 Apr 9, 2025
0.3.2 Stable 10–11 Apr 9, 2025
0.4.1 Stable 10–11 Apr 7, 2025
0.4.0 Stable 10–11 Apr 5, 2025
0.3.1 Stable 10–11 Apr 4, 2025
0.3.0 Stable 10–11 Apr 1, 2025
0.2.2 Stable 10–11 Jan 31, 2025
0.2.1 Stable 10–11 Nov 8, 2024
0.2.0 Stable 10–11 Oct 24, 2024
0.1.1 Stable 10–11 Oct 23, 2024