Getting Started with react-d3-components: Build React D3.js Charts That Scale





React D3 Components: Quick Guide, Charts & Setup




Getting Started with react-d3-components: Build React D3.js Charts That Scale

Tags: react-d3-components • React D3 charts • React data visualization

Overview — What react-d3-components solves

react-d3-components is a lightweight bridge between D3.js’ powerful SVG/data-binding primitives and React’s component model. Instead of rewriting charting logic from scratch each time, it exposes reusable React components that encapsulate D3 rendering for common visualizations—line, bar, pie, stacked, and more.

The library matters when you want the best of both worlds: D3’s scale/axis utilities and React’s state-driven rendering. It helps you implement React D3 charts that remain declarative while letting D3 compute geometry and transitions.

This guide is a practical react-d3-components tutorial and reference: quick installation and setup, code examples (line, bar, pie), customization strategies, performance tips, and how to use these charts inside a dashboard. If you prefer a hands-on walkthrough, follow the example code snippets and the linked “getting started” tutorial.

Quick start: Installation and setup

First, install the package plus D3. Most setups require React 16+ (or modern stable React) and a compatible D3 minor version. Use npm or yarn depending on your workflow:

npm install react-d3-components d3
# or
yarn add react-d3-components d3

Import components into your app and pass data via props. A minimal pattern separates D3 data preparation (scales, accessors) from the presentational component. Keep D3 DOM manipulations inside the component so React can control mounting and updates via lifecycle methods or useEffect hooks.

The linked tutorial contains a full “getting started” example that demonstrates dossier-like structure: data → accessor → component. See the react-d3-components tutorial for a step-by-step walkthrough and sample datasets.

Getting started with react-d3-components (tutorial)

Examples: Line, Bar, and Pie charts

React D3 line chart (time-series)

Line charts are the most common use-case for react-d3-components. The typical flow: compute an x-scale (time or linear), compute a y-scale, map data to points, and render an SVG path. The component accepts data arrays and accessor functions, keeping the rendering declarative.

Example pattern: prepare your data as [{x: Date, y: Number}, …], pass it as the series prop, and configure width/height. D3 handles path generation via d3.line(), and the component maps that into an SVG . For performance, memoize path calculations or use useMemo.

Interactivity (hover, brush, tooltips) is implemented by wiring mouse events to the SVG elements and updating React state or invoking callbacks. Keep tooltip DOM outside the SVG or use a portal to avoid z-index issues.

React D3 bar chart (categorical)

Bar charts use band scales for x and linear scales for y. The component composition typically renders rects for each data point, with axis generators creating ticks and labels. For grouped/stacked bars, compute offsets and pass multiple series to the chart component.

Accessibility and semantics matter: include elements for SVG elements, aria-labels on interactive bars, and keyboard handlers for drill-down interactions. For large datasets, virtualize or aggregate to preserve performance. </p> <p> Animations are commonly implemented with D3 transitions or by toggling CSS transitions. Use transitions sparingly and prefer requestAnimationFrame for complex multi-element updates to avoid jank. </p> <h3>React D3 pie chart (proportional)</h3> <p> Pie charts revolve around d3.pie() and d3.arc(). The component computes start and end angles per slice and renders <path> arcs. Supply a color scale or palette and an optional innerRadius for donut variants. Exploded slices and hover offsets are easiest when arc generators accept offsets via props. </p> <p> For accessibility, provide a legend and numeric labels; do not rely solely on color. Tooltips should summarize percent and raw values and be keyboard accessible. </p> <p> Pie charts can be animated by interpolating arc angles on data updates. Again, encapsulate D3 transitions inside the component so React only triggers changes via props/state, maintaining a clean separation of concerns. </p> </section> <section> <h2>Customization and component patterns</h2> <p> Customize react-d3-components by passing props: width, height, margin, colorScale, data accessors, and callback hooks like onMouseOver or onClick. Many components expose render props so you can supply custom labels, tooltips, or tick formatters. </p> <p> When more control is required, wrap the library components with your own components. Use composition to add legends, filtering controls, and data transformation. For example, a ChartContainer component can handle loading state, error handling, and responsive sizing, delegating rendering to the react-d3-components visualization. </p> <p> Styling: Prefer CSS classes and inline SVG attributes over direct DOM mutations. If you must manipulate the DOM for advanced D3 interactions, do so in useEffect and ensure cleanup. Avoid conflicting with React’s reconciliation by not letting D3 own entire DOM subtrees unless carefully isolated. </p> </section> <section> <h2>Performance, responsiveness, and best practices</h2> <p> Keep D3 computations pure and memoized. Heavy work—scale recomputation, layout calculations, path generation—should be cached with useMemo or performed outside render. Debounce resize handlers and batch updates where possible. </p> <p> For responsive charts, use SVG viewBox with preserveAspectRatio and compute width/height from container dimensions. Alternatively, use a ResizeObserver and set dimensions in state; debounce updates to avoid thrashing. </p> <p> When dealing with many data points, reduce SVG element count by aggregating points, sampling, or switching to canvas for rendering. For mixed-mode dashboards, render static overview charts as images or lightweight sparklines to reduce CPU and paint costs. </p> </section> <section> <h2>Integrating charts into dashboards</h2> <p> Dashboards typically combine multiple React D3 charts with shared interactions: cross-filtering, shared time windows, and linked tooltips. Use a top-level state manager (Context, Redux, or state hoisting) to synchronize filters and selections across components. </p> <p> Layout concerns: lazy-load off-screen charts, render placeholders for slow data, and prioritize critical charts for first paint. Compose each visual into a ChartCard that handles its own loading, error, and export behavior (SVG/PNG). </p> <p> If you need drill-downs, expose onClick callbacks that provide data keys or indices. Keep the chart components agnostic to the data-fetching layer so they remain reusable and testable. </p> </section> <section> <h2>Code snippet: Minimal line chart component</h2> <p> This minimal pattern shows how to import and use a ready component while keeping data preparation in the parent. It assumes react-d3-components exposes a LineChart-like component (API varies by package). </p> <pre><code>import React from 'react'; import { Line } from 'react-d3-components'; // adjust to actual export // data: [{label: 'series1', values: [{x: new Date(), y: 10}, ...]}] export default function MinimalLine({data, width=800, height=300}) { return ( <div> <Line data={data} width={width} height={height} margin={{top:10,right:10,bottom:50,left:50}}/> </div> ); }</code></pre> <p> Replace the component name and props according to the package version. The important part: pass sanitized data, width/height, and margin; keep transitions and event callbacks explicit. </p> </section> <section> <h2>Links and resources</h2> <p> Official libraries and docs are crucial when building production charts. Refer to D3 core utilities for scales, axes, and shape generators, and React docs for lifecycle and hooks: </p> <ul> <li><a href="https://d3js.org" rel="noopener">D3.js — scales, axes, shapes</a></li> <li><a href="https://reactjs.org" rel="noopener">React — official docs and hooks guide</a></li> <li><a href="https://github.com/react-d3/react-d3-components" rel="noopener">react-d3-components on GitHub</a> (source, issues, examples)</li> <li><a href="https://dev.to/stackforgedev/getting-started-with-react-d3-components-creating-d3-charts-in-react-33pn" rel="noopener">react-d3-components tutorial (step-by-step)</a></li> </ul> </section> <section> <h2>Semantic core (keyword clusters)</h2> <p class="badge">Use these keywords to optimize pages, headings, and anchor text. Grouped by intent and priority.</p> <div> <strong>Primary (target)</strong></p> <ul> <li>react-d3-components</li> <li>React D3.js</li> <li>React data visualization</li> <li>React D3 charts</li> </ul> <p> <strong>Secondary (tutorial/setup/examples)</strong></p> <ul> <li>react-d3-components tutorial</li> <li>react-d3-components installation</li> <li>react-d3-components setup</li> <li>react-d3-components getting started</li> <li>react-d3-components example</li> <li>react-d3-components customization</li> </ul> <p> <strong>Clarifying / Long-tail & LSI</strong></p> <ul> <li>React D3 line chart</li> <li>React D3 bar chart</li> <li>React D3 pie chart</li> <li>React D3 component</li> <li>responsive D3 charts in React</li> <li>SVG scales axes transitions</li> <li>data binding with D3 and React</li> </ul></div> </section> <section> <h2>FAQ — top questions</h2> <h3>How do I install and set up react-d3-components?</h3> <p> Install via npm or yarn (npm install react-d3-components d3). Import the components into your code, pass sanitized data arrays and configuration props (width, height, margins, colorScale), and ensure React and D3 are compatible. Encapsulate D3 rendering inside components using lifecycle hooks (classDidMount/componentDidUpdate) or useEffect so React controls mount/unmount behavior. </p> <h3>Can I create responsive line, bar, and pie charts with react-d3-components?</h3> <p> Yes. Two common approaches: use SVG viewBox with percentage-based sizing, or measure the container (ResizeObserver) and pass explicit pixel dimensions to the chart. Use debouncing to avoid frequent re-renders and keep D3 calculations memoized. For touch and accessibility, expose accessible labels and keyboard handlers. </p> <h3>How can I customize tooltips, transitions, and colors?</h3> <p> Pass color scales, formatter functions, and render props where available. For tooltips, either use the component’s tooltip hooks or implement a separate tooltip component that listens to mouse events and positions itself with absolute coordinates. For transitions, prefer D3 interpolators wrapped inside the chart component so state-driven updates trigger smooth animations without breaking React’s reconciliation. </p> </section> <footer> <p class="meta">Recommended link: <a href="https://dev.to/stackforgedev/getting-started-with-react-d3-components-creating-d3-charts-in-react-33pn" rel="noopener">Getting started with react-d3-components — tutorial</a></p> </footer> </article> <p></body><br /> </html></p> </div><!-- .entry-content .clear --> </div> </article><!-- #post-## --> <nav class="navigation post-navigation" role="navigation" aria-label="Articoli"> <h2 class="screen-reader-text">Navigazione articoli</h2> <div class="nav-links"><div class="nav-previous"><a href="https://fattorialagreppia.it/kbar-the-complete-guide-to-react-command-palettes/" rel="prev"><span class="ast-left-arrow">←</span> Precedente Articolo</a></div><div class="nav-next"><a href="https://fattorialagreppia.it/mantine-contextmenu-in-react-setup-examples-customization/" rel="next">Successivo Articolo <span class="ast-right-arrow">→</span></a></div></div> </nav> </main><!-- #main --> </div><!-- #primary --> </div> <!-- ast-container --> </div><!-- #content --> <link rel='stylesheet' id='fl-builder-layout-89-css' href='https://fattorialagreppia.it/wp-content/uploads/bb-plugin/cache/89-layout.css?ver=f0d73bbaa2dc838e980fede04fd72c63' media='all' /> <div class="fl-builder-content fl-builder-content-89 fl-builder-template fl-builder-row-template fl-builder-global-templates-locked" data-post-id="89"><footer class="fl-row fl-row-full-width fl-row-bg-color fl-node-5fd217a20a25c" data-node="5fd217a20a25c"> <div class="fl-row-content-wrap"> <div class="fl-row-content fl-row-full-width fl-node-content"> <div class="fl-col-group fl-node-5fd217a20a4f5" data-node="5fd217a20a4f5"> <div class="fl-col fl-node-5fd217a20a56d fl-col-has-cols" data-node="5fd217a20a56d"> <div class="fl-col-content fl-node-content"> <div class="fl-col-group fl-node-5fd218197eedc fl-col-group-nested fl-col-group-equal-height fl-col-group-align-top fl-col-group-custom-width" data-node="5fd218197eedc"> <div class="fl-col fl-node-5fd218197f35e fl-col-small" data-node="5fd218197f35e"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-photo fl-node-5fd21821a90b8" data-node="5fd21821a90b8"> <div class="fl-module-content fl-node-content"> <div class="fl-photo fl-photo-align-center" itemscope itemtype="https://schema.org/ImageObject"> <div class="fl-photo-content fl-photo-img-png"> <a href="https://fattorialagreppia.it" target="_self" itemprop="url"> <img loading="lazy" class="fl-photo-img wp-image-39 size-full" src="https://fattorialagreppia.it/wp-content/uploads/2020/12/logo-La-Greppia.png" alt="logo La Greppia" itemprop="image" height="105" width="459" title="logo La Greppia" srcset="https://fattorialagreppia.it/wp-content/uploads/2020/12/logo-La-Greppia.png 459w, https://fattorialagreppia.it/wp-content/uploads/2020/12/logo-La-Greppia-300x69.png 300w" sizes="(max-width: 459px) 100vw, 459px" /> </a> </div> </div> </div> </div> </div> </div> <div class="fl-col fl-node-5fd218197f360 fl-col-small" data-node="5fd218197f360"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text fl-node-5fd218366128b" data-node="5fd218366128b"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>Fattoria La Greppia<br /> via Monte Palazzo, 25 - 36034 Malo (VI)<br /> P. IVA 02916280247</p> </div> </div> </div> </div> </div> <div class="fl-col fl-node-5fd218197f362 fl-col-small" data-node="5fd218197f362"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-menu fl-node-5fd218b3ea21a" data-node="5fd218b3ea21a"> <div class="fl-module-content fl-node-content"> <div class="fl-menu"> <div class="fl-clear"></div> <nav aria-label="Menu" itemscope="itemscope" itemtype="https://schema.org/SiteNavigationElement"><ul id="menu-footer" class="menu fl-menu-vertical fl-toggle-none"><li id="menu-item-91" class="menu-item menu-item-type-post_type menu-item-object-page menu-item-privacy-policy"><a href="https://fattorialagreppia.it/privacy-policy/">Privacy policy</a></li><li id="menu-item-95" class="menu-item menu-item-type-post_type menu-item-object-page"><a href="https://fattorialagreppia.it/cookie-policy/">Cookie policy</a></li><li id="menu-item-92" class="menu-item menu-item-type-custom menu-item-object-custom"><a href="https://www.oliverlab.com/">Credits</a></li></ul></nav></div> </div> </div> </div> </div> <div class="fl-col fl-node-5fd218197f363" data-node="5fd218197f363"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-photo fl-node-5fd219f77ed0b" data-node="5fd219f77ed0b"> <div class="fl-module-content fl-node-content"> <div class="fl-photo fl-photo-align-right" itemscope itemtype="https://schema.org/ImageObject"> <div class="fl-photo-content fl-photo-img-png"> <img loading="lazy" class="fl-photo-img wp-image-267 size-full" src="https://fattorialagreppia.it/wp-content/uploads/2021/02/loghi-footer-v3.png" alt="loghi footer v3" itemprop="image" height="119" width="1326" title="loghi footer v3" srcset="https://fattorialagreppia.it/wp-content/uploads/2021/02/loghi-footer-v3.png 1326w, https://fattorialagreppia.it/wp-content/uploads/2021/02/loghi-footer-v3-300x27.png 300w, https://fattorialagreppia.it/wp-content/uploads/2021/02/loghi-footer-v3-1024x92.png 1024w, https://fattorialagreppia.it/wp-content/uploads/2021/02/loghi-footer-v3-768x69.png 768w" sizes="(max-width: 1326px) 100vw, 1326px" /> </div> </div> </div> </div> </div> </div> </div> </div> </div> </div> <div class="fl-col-group fl-node-6066e54d4e7d4" data-node="6066e54d4e7d4"> <div class="fl-col fl-node-6066e54d4e852" data-node="6066e54d4e852"> <div class="fl-col-content fl-node-content"> <div class="fl-module fl-module-rich-text fl-node-6066e54d4e793" data-node="6066e54d4e793"> <div class="fl-module-content fl-node-content"> <div class="fl-rich-text"> <p>This site is protected by reCAPTCHA and the Google <a href="https://policies.google.com/privacy">Privacy Policy</a> and <a href="https://policies.google.com/terms">Terms of Service</a> apply.</p> </div> </div> </div> </div> </div> </div> </div> </div> </footer> </div><div class="uabb-js-breakpoint" style="display: none;"></div> </div><!-- #page --> <link rel='stylesheet' id='astra-addon-megamenu-dynamic-css' href='https://fattorialagreppia.it/wp-content/plugins/astra-addon/addons/nav-menu/assets/css/minified/magamenu-frontend.min.css?ver=4.9.1' media='all' /> <style id='astra-addon-megamenu-dynamic-inline-css'> .ast-desktop .menu-item-141 .astra-mm-icon-label.icon-item-141, .ast-header-break-point .menu-item-141 .astra-mm-icon-label.icon-item-141{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-141 .astra-mm-icon-label.icon-item-141 svg, .ast-header-break-point .menu-item-141 .astra-mm-icon-label.icon-item-141 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-142 .astra-mm-icon-label.icon-item-142, .ast-header-break-point .menu-item-142 .astra-mm-icon-label.icon-item-142{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-142 .astra-mm-icon-label.icon-item-142 svg, .ast-header-break-point .menu-item-142 .astra-mm-icon-label.icon-item-142 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-2063 .astra-mm-icon-label.icon-item-2063, .ast-header-break-point .menu-item-2063 .astra-mm-icon-label.icon-item-2063{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-2063 .astra-mm-icon-label.icon-item-2063 svg, .ast-header-break-point .menu-item-2063 .astra-mm-icon-label.icon-item-2063 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-296 .astra-mm-icon-label.icon-item-296, .ast-header-break-point .menu-item-296 .astra-mm-icon-label.icon-item-296{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-296 .astra-mm-icon-label.icon-item-296 svg, .ast-header-break-point .menu-item-296 .astra-mm-icon-label.icon-item-296 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-293 .astra-mm-icon-label.icon-item-293, .ast-header-break-point .menu-item-293 .astra-mm-icon-label.icon-item-293{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-293 .astra-mm-icon-label.icon-item-293 svg, .ast-header-break-point .menu-item-293 .astra-mm-icon-label.icon-item-293 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-294 .astra-mm-icon-label.icon-item-294, .ast-header-break-point .menu-item-294 .astra-mm-icon-label.icon-item-294{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-294 .astra-mm-icon-label.icon-item-294 svg, .ast-header-break-point .menu-item-294 .astra-mm-icon-label.icon-item-294 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-656 .astra-mm-icon-label.icon-item-656, .ast-header-break-point .menu-item-656 .astra-mm-icon-label.icon-item-656{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-656 .astra-mm-icon-label.icon-item-656 svg, .ast-header-break-point .menu-item-656 .astra-mm-icon-label.icon-item-656 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-657 .astra-mm-icon-label.icon-item-657, .ast-header-break-point .menu-item-657 .astra-mm-icon-label.icon-item-657{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-657 .astra-mm-icon-label.icon-item-657 svg, .ast-header-break-point .menu-item-657 .astra-mm-icon-label.icon-item-657 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-668 .astra-mm-icon-label.icon-item-668, .ast-header-break-point .menu-item-668 .astra-mm-icon-label.icon-item-668{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-668 .astra-mm-icon-label.icon-item-668 svg, .ast-header-break-point .menu-item-668 .astra-mm-icon-label.icon-item-668 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-658 .astra-mm-icon-label.icon-item-658, .ast-header-break-point .menu-item-658 .astra-mm-icon-label.icon-item-658{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-658 .astra-mm-icon-label.icon-item-658 svg, .ast-header-break-point .menu-item-658 .astra-mm-icon-label.icon-item-658 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-1997 .astra-mm-icon-label.icon-item-1997, .ast-header-break-point .menu-item-1997 .astra-mm-icon-label.icon-item-1997{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-1997 .astra-mm-icon-label.icon-item-1997 svg, .ast-header-break-point .menu-item-1997 .astra-mm-icon-label.icon-item-1997 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-1851 .astra-mm-icon-label.icon-item-1851, .ast-header-break-point .menu-item-1851 .astra-mm-icon-label.icon-item-1851{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-1851 .astra-mm-icon-label.icon-item-1851 svg, .ast-header-break-point .menu-item-1851 .astra-mm-icon-label.icon-item-1851 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-779 .astra-mm-icon-label.icon-item-779, .ast-header-break-point .menu-item-779 .astra-mm-icon-label.icon-item-779{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-779 .astra-mm-icon-label.icon-item-779 svg, .ast-header-break-point .menu-item-779 .astra-mm-icon-label.icon-item-779 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-428 .astra-mm-icon-label.icon-item-428, .ast-header-break-point .menu-item-428 .astra-mm-icon-label.icon-item-428{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-428 .astra-mm-icon-label.icon-item-428 svg, .ast-header-break-point .menu-item-428 .astra-mm-icon-label.icon-item-428 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-145 .astra-mm-icon-label.icon-item-145, .ast-header-break-point .menu-item-145 .astra-mm-icon-label.icon-item-145{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-145 .astra-mm-icon-label.icon-item-145 svg, .ast-header-break-point .menu-item-145 .astra-mm-icon-label.icon-item-145 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-707 .astra-mm-icon-label.icon-item-707, .ast-header-break-point .menu-item-707 .astra-mm-icon-label.icon-item-707{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-707 .astra-mm-icon-label.icon-item-707 svg, .ast-header-break-point .menu-item-707 .astra-mm-icon-label.icon-item-707 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-706 .astra-mm-icon-label.icon-item-706, .ast-header-break-point .menu-item-706 .astra-mm-icon-label.icon-item-706{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-706 .astra-mm-icon-label.icon-item-706 svg, .ast-header-break-point .menu-item-706 .astra-mm-icon-label.icon-item-706 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-722 .astra-mm-icon-label.icon-item-722, .ast-header-break-point .menu-item-722 .astra-mm-icon-label.icon-item-722{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-722 .astra-mm-icon-label.icon-item-722 svg, .ast-header-break-point .menu-item-722 .astra-mm-icon-label.icon-item-722 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-2064 .astra-mm-icon-label.icon-item-2064, .ast-header-break-point .menu-item-2064 .astra-mm-icon-label.icon-item-2064{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-2064 .astra-mm-icon-label.icon-item-2064 svg, .ast-header-break-point .menu-item-2064 .astra-mm-icon-label.icon-item-2064 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-708 .astra-mm-icon-label.icon-item-708, .ast-header-break-point .menu-item-708 .astra-mm-icon-label.icon-item-708{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-708 .astra-mm-icon-label.icon-item-708 svg, .ast-header-break-point .menu-item-708 .astra-mm-icon-label.icon-item-708 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-709 .astra-mm-icon-label.icon-item-709, .ast-header-break-point .menu-item-709 .astra-mm-icon-label.icon-item-709{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-709 .astra-mm-icon-label.icon-item-709 svg, .ast-header-break-point .menu-item-709 .astra-mm-icon-label.icon-item-709 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-710 .astra-mm-icon-label.icon-item-710, .ast-header-break-point .menu-item-710 .astra-mm-icon-label.icon-item-710{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-710 .astra-mm-icon-label.icon-item-710 svg, .ast-header-break-point .menu-item-710 .astra-mm-icon-label.icon-item-710 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-711 .astra-mm-icon-label.icon-item-711, .ast-header-break-point .menu-item-711 .astra-mm-icon-label.icon-item-711{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-711 .astra-mm-icon-label.icon-item-711 svg, .ast-header-break-point .menu-item-711 .astra-mm-icon-label.icon-item-711 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-713 .astra-mm-icon-label.icon-item-713, .ast-header-break-point .menu-item-713 .astra-mm-icon-label.icon-item-713{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-713 .astra-mm-icon-label.icon-item-713 svg, .ast-header-break-point .menu-item-713 .astra-mm-icon-label.icon-item-713 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-714 .astra-mm-icon-label.icon-item-714, .ast-header-break-point .menu-item-714 .astra-mm-icon-label.icon-item-714{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-714 .astra-mm-icon-label.icon-item-714 svg, .ast-header-break-point .menu-item-714 .astra-mm-icon-label.icon-item-714 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-715 .astra-mm-icon-label.icon-item-715, .ast-header-break-point .menu-item-715 .astra-mm-icon-label.icon-item-715{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-715 .astra-mm-icon-label.icon-item-715 svg, .ast-header-break-point .menu-item-715 .astra-mm-icon-label.icon-item-715 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-1395 .astra-mm-icon-label.icon-item-1395, .ast-header-break-point .menu-item-1395 .astra-mm-icon-label.icon-item-1395{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-1395 .astra-mm-icon-label.icon-item-1395 svg, .ast-header-break-point .menu-item-1395 .astra-mm-icon-label.icon-item-1395 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-1850 .astra-mm-icon-label.icon-item-1850, .ast-header-break-point .menu-item-1850 .astra-mm-icon-label.icon-item-1850{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-1850 .astra-mm-icon-label.icon-item-1850 svg, .ast-header-break-point .menu-item-1850 .astra-mm-icon-label.icon-item-1850 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-990 .astra-mm-icon-label.icon-item-990, .ast-header-break-point .menu-item-990 .astra-mm-icon-label.icon-item-990{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-990 .astra-mm-icon-label.icon-item-990 svg, .ast-header-break-point .menu-item-990 .astra-mm-icon-label.icon-item-990 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-716 .astra-mm-icon-label.icon-item-716, .ast-header-break-point .menu-item-716 .astra-mm-icon-label.icon-item-716{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-716 .astra-mm-icon-label.icon-item-716 svg, .ast-header-break-point .menu-item-716 .astra-mm-icon-label.icon-item-716 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-718 .astra-mm-icon-label.icon-item-718, .ast-header-break-point .menu-item-718 .astra-mm-icon-label.icon-item-718{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-718 .astra-mm-icon-label.icon-item-718 svg, .ast-header-break-point .menu-item-718 .astra-mm-icon-label.icon-item-718 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;}.ast-desktop .menu-item-719 .astra-mm-icon-label.icon-item-719, .ast-header-break-point .menu-item-719 .astra-mm-icon-label.icon-item-719{display:inline-block;vertical-align:middle;line-height:0;margin:5px;}.ast-desktop .menu-item-719 .astra-mm-icon-label.icon-item-719 svg, .ast-header-break-point .menu-item-719 .astra-mm-icon-label.icon-item-719 svg{color:var(--ast-global-color-0);fill:var(--ast-global-color-0);width:20px;height:20px;} </style> <script id='astra-theme-js-js-extra'> var astra = {"break_point":"921","isRtl":"","revealEffectEnable":"","edit_post_url":"https:\/\/fattorialagreppia.it\/wp-admin\/post.php?post={{id}}&action=edit","ajax_url":"https:\/\/fattorialagreppia.it\/wp-admin\/admin-ajax.php","infinite_count":"2","infinite_total":"0","pagination":"number","infinite_scroll_event":"scroll","no_more_post_message":"Non ci sono pi\u00f9 articoli da mostrare.","grid_layout":"1","site_url":"https:\/\/fattorialagreppia.it","blogArchiveTitleLayout":"","blogArchiveTitleOn":"","show_comments":"Mostra Commenti","masonryEnabled":"","blogMasonryBreakPoint":"0"}; </script> <script src='https://fattorialagreppia.it/wp-content/themes/astra/assets/js/minified/frontend.min.js?ver=3.4.1' id='astra-theme-js-js'></script> <script src='https://fattorialagreppia.it/wp-content/plugins/material-design-for-contact-form-7-premium/public/../assets/js/lib/autosize.min.js?ver=1.0' id='autosize-js'></script> <script src='https://fattorialagreppia.it/wp-content/plugins/material-design-for-contact-form-7-premium/public/../assets/js/cf7-material-design-bundle.js?ver=2.6.4' id='cf7-material-design-js'></script> <script id='astra-addon-js-js-extra'> var astraAddon = {"sticky_active":"1","svgIconClose":"<span class=\"ast-icon icon-close\"><\/span>","hf_account_show_menu_on":"hover","hf_account_action_type":"link","header_main_stick":"1","header_above_stick":"0","header_below_stick":"0","stick_header_meta":"","header_main_stick_meta":"","header_above_stick_meta":"","header_below_stick_meta":"","sticky_header_on_devices":"both","sticky_header_style":"none","sticky_hide_on_scroll":"0","break_point":"921","tablet_break_point":"921","mobile_break_point":"544","header_main_shrink":"1","header_logo_width":"","responsive_header_logo_width":{"desktop":"200","tablet":120,"mobile":100},"stick_origin_position":"","site_layout":"ast-full-width-layout","site_content_width":"1240","site_layout_padded_width":"1200","site_layout_box_width":"1200","header_builder_active":"1","component_limit":"10","is_header_builder_active":"1"}; </script> <script src='https://fattorialagreppia.it/wp-content/uploads/astra-addon/astra-addon-67dad2f5d8ebd9-44702943.js?ver=4.9.1' id='astra-addon-js-js'></script> <script src='https://fattorialagreppia.it/wp-content/plugins/astra-addon/assets/js/minified/purify.min.js?ver=4.9.1' id='astra-dom-purify-js'></script> <script src='https://www.google.com/recaptcha/api.js?render=6LcfPZkaAAAAAFm7LJON_A3foCzWa37ewknkwOZX&ver=3.0' id='google-recaptcha-js'></script> <script src='https://fattorialagreppia.it/wp-includes/js/dist/vendor/wp-polyfill.min.js?ver=7.4.4' id='wp-polyfill-js'></script> <script id='wp-polyfill-js-after'> ( 'fetch' in window ) || document.write( '<script src="https://fattorialagreppia.it/wp-includes/js/dist/vendor/wp-polyfill-fetch.min.js?ver=3.0.0"></scr' + 'ipt>' );( document.contains ) || document.write( '<script src="https://fattorialagreppia.it/wp-includes/js/dist/vendor/wp-polyfill-node-contains.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.DOMRect ) || document.write( '<script src="https://fattorialagreppia.it/wp-includes/js/dist/vendor/wp-polyfill-dom-rect.min.js?ver=3.42.0"></scr' + 'ipt>' );( window.URL && window.URL.prototype && window.URLSearchParams ) || document.write( '<script src="https://fattorialagreppia.it/wp-includes/js/dist/vendor/wp-polyfill-url.min.js?ver=3.6.4"></scr' + 'ipt>' );( window.FormData && window.FormData.prototype.keys ) || document.write( '<script src="https://fattorialagreppia.it/wp-includes/js/dist/vendor/wp-polyfill-formdata.min.js?ver=3.0.12"></scr' + 'ipt>' );( Element.prototype.matches && Element.prototype.closest ) || document.write( '<script src="https://fattorialagreppia.it/wp-includes/js/dist/vendor/wp-polyfill-element-closest.min.js?ver=2.0.2"></scr' + 'ipt>' );( 'objectFit' in document.documentElement.style ) || document.write( '<script src="https://fattorialagreppia.it/wp-includes/js/dist/vendor/wp-polyfill-object-fit.min.js?ver=2.3.4"></scr' + 'ipt>' ); </script> <script id='wpcf7-recaptcha-js-extra'> var wpcf7_recaptcha = {"sitekey":"6LcfPZkaAAAAAFm7LJON_A3foCzWa37ewknkwOZX","actions":{"homepage":"homepage","contactform":"contactform"}}; </script> <script src='https://fattorialagreppia.it/wp-content/plugins/contact-form-7/modules/recaptcha/index.js?ver=5.4.1' id='wpcf7-recaptcha-js'></script> <script src='https://fattorialagreppia.it/wp-includes/js/wp-embed.min.js?ver=5.7.15' id='wp-embed-js'></script> <script src='https://fattorialagreppia.it/wp-content/uploads/bb-plugin/cache/89-layout.js?ver=2e33f5638a3b4ae71877d3d0987c424d' id='fl-builder-layout-89-js'></script> <script> /(trident|msie)/i.test(navigator.userAgent)&&document.getElementById&&window.addEventListener&&window.addEventListener("hashchange",function(){var t,e=location.hash.substring(1);/^[A-z0-9_-]+$/.test(e)&&(t=document.getElementById(e))&&(/^(?:a|select|input|button|textarea)$/i.test(t.tagName)||(t.tabIndex=-1),t.focus())},!1); </script> </body> </html>