Elastocapillarity-driven 2D nano-switches enable zeptoliter-scale liquid encapsulation

Biological nanostructures change their shape and function in response to external stimuli, and significant efforts have been made to design artificial biomimicking devices operating on similar principles. In this work we demonstrate a programmable nanofluidic switch, driven by elastocapillarity, and based on nanochannels built from layered two-dimensional nanomaterials possessing atomically smooth surfaces and exceptional mechanical properties. We explore operational modes of the nanoswitch and develop a theoretical framework to explain the phenomenon. By predicting the switching-reversibility phase diagram—based on material, interfacial and wetting properties, as well as the geometry of the nanofluidic circuit—we rationally design switchable nano-capsules capable of enclosing zeptoliter volumes of liquid, as small as the volumes enclosed in viruses. The nanoswitch will find useful application as an active element in integrated nanofluidic circuitry and could be used to explore nanoconfined chemistry and biochemistry, or be incorporated into shape-programmable materials.


Introduction
In the natural world, living structures exhibit a programmable response to external stimuli -such as mechanical, chemical, or electrical -and adapt their properties, shape, and function to match the changing environment 1 .Intelligent materials and devices 2 , including emerging nanofluidic devices 3,4 , are foreseen to mimic such functionalities of living matter, combining sensing, actuation, and computation.Reversible shape-switching [5][6][7] based on chemical and physical signals lead to design of artificial muscles 8 and microscopic robots 9 .The contemporary programmable structures 10 operate at scales above 10 µm due to mechanical limitations of solidstate thin films and elastomers that drive the switching process 8 .Here we developed a nanoscale switch operating at the 10-nanometre characteristic scale, based on nanochannels in twodimensional materials, undergoing controlled elastocapillary transitions.We rationalized the switching process based on geometry, material, and liquid properties.This insight allowed us to rationally design the device geometries for desired functionalities and we demonstrated operation of switchable nano-containers capable of enclosing zeptoliter volumes.Our mechanically switchable nanofluidic systems could further scale down on-device chemistry beyond impressive microfluidic technologies [11][12][13] and could become an active element in adaptable nanofluidic circuitry.
Capillarity defines liquid-gas interfaces, drives the wetting of porous media 14 and, not least, allows trees to pull water up their xylems over tens of meters 15 .In nanometer-sized pores, capillary pressures of several hundreds of bars build up 16 , and such dramatic pressures can deform the confining medium through a phenomenon known as elastocapillarity 17,18 .In semiconductor foundries, wetting and drying steps introduce a risk of elastocapillary damage and can trigger unwanted adhesion, thus hindering the miniaturization of electronic systems 19,20 .
In this work, we designed 2D nanochannels in which the action of elastocapillarity is reversible, and we employ it as a mechanical switching mechanism.We used two-dimensional layered materials (graphene, hBN or WS2) as building blocks, as they can achieve nanometer-sized features while displaying atomically smooth interfaces and outstanding mechanical properties 21 .The nanochannels are designed by stacking several layered 2D crystals 22 on top of the SiO2/Si substrate: a) the bottom wall of the channel is defined by either a 2D crystal or base SiO2 substrate; b) another 2D crystal is patterned into stripes to define the sidewalls of the nanochannel; c) and the final 2D crystal, with atomically controllable thickness, defines the top wall and operates as an actuator.This nanoscale capillarity-actuated structure -nanoswitch -is designed by tuning the width and height of the channels and the thickness of the top wall (Figure 1).
Two-dimensional nanochannels with sub-nanometer height but very stiff walls have been used to explore water 22 and ion flow 23 in the regime of extreme confinement.Ängstrom-scale 'sagging' in such stiff channels has been used to monitor the presence of water in channels 24 and explore the onset of capillary condensation 25 .These deformations were attributed to van der Waals interactions with the channel side walls, which is a distinct mechanism from the phenomenon at play in this work.Instead, we designed the 2D nanochannels to operate in different physical regime, where the channel walls could cave in under the capillary forces.To achieve the nanoswitch, the channels must satisfy two criteria: capillary forces must be strong enough to bend the top channel wall; and the adhesion between the top and bottom wall should be countered by the top layer stiffness to allow for reversible channel opening upon wetting.The interplay between elastocapillarity and adhesion determined the 10-nanometre scale motion of the top channel wall under the action of capillary pressures exceeding 100 bar, realizing new nanoscale machines which react not to traditional chemical 26 or electromechanical stimuli 27 but to liquid surface tension.

Design and operation of the nanoswitches
We designed nanochannels using van der Waals assembly of mechanically exfoliated crystals of graphite (Gr), hexagonal boron nitride (hBN) or tungsten disulphide (WS2) transferred onto a silicon substrate with a thermal oxide layer (SiO2).The graphite crystal (thickness: ℎ ∼ 10 − 20 nm) was patterned into stripes using electron beam lithography and reactive ion etching to define spacers.The channel width ( = 400 − 1000 nm) and the top crystal thickness ( = 10 − 40 nm) defined the top channel wall flexibility.For parallel channels, the pitch did not play any role in the observed phenomena, so we chose it large enough  = 1 − 2 µm, to allow diffraction-limited imaging of individual channels.Details on the fabrication procedure can be found in the 'Methods' section.The channel geometry is illustrated in Figure 1a.
The channels were filled with various liquids and subsequently the devices were blow-dried with nitrogen.The drying process could lead to the caving-in of the top wall onto the substrate, as sketched in Figure 1b.Similar observations at larger scales were reported in micromachined channels 19,28 and in high-aspect ratio nanopillars 29,30 .They are attributed to a twofold process: the nanostructure is deformed under the capillary pressure that builds up at the liquid-air interface 31 (Figure 1c), and adhesion maintains the deformation after drying.
We present in Figure 1d a strain map in the channel cross-section calculated for our devices with a model introduced below, leading to both compressive and tensile strain in the order of few percent.The changes between the stiff and caved-in configuration are visualized using atomic force microscopy (AFM) in tapping mode (Figure 1e-f), here for device D1 using a hBN top crystal, graphite spacers, and a silicon oxide substrate (abbreviated as hBN/Gr/SiO2).The choice of hBN as a top wall material was motivated by its transparency, which allowed imaging the nanoswitch under a standard wide-field optical microscope.We show in Figure 2a-c that the mechanical changes in the crystal correspond to optical contrast (for thick enough spacers).As presented in Supplementary Movie 1, high-speed dark field imaging enabled capturing these mechanical deformations as they happened.We demonstrated the operation of the switch in device D2 (Figure 2), with top channel walls made from hBN of thickness of  = 34 nm, exhibiting a good optical contrast between flat on-state and caved-in off-state.Upon critical point drying (that is, ethanol is first replaced by liquid CO2, which is driven beyond its critical point), all channels are open (Figure 2a).Upon isopropanol (IPA) drying, we find that a portion of channels is in the off-state (dark) and the rest in on-state (bright); see Figure 2b.By filling the channels with water followed by drying, all channels cave in and appear dark (Figure 2c).The observed optical contrast can be directly correlated to the topography measured by AFM: Figure 2d-e shows height profiles along the colored lines in Figure 2a-c.
Replacing the liquid leads to different surface tension, and thus the magnitude of the capillary force during channel drying.During CO2 critical point drying, there is no liquid-gas interface, and therefore no capillary pressure builds up.Water has a high surface tension  = 72 mN/m and IPA has a lower value ( = 21 mN/m), which is why IPA removal leaves some channels open.We used water-IPA mixtures to control the magnitude of the surface tension 32 and counted closed channels as a function of the surface tension.This defines the switch-stimulus curve in Figure 2f.
Closed channels remained closed for months, as long as they were dry, but they relaxed to their open position upon re-wetting.We were able to reversibly switch from the on-to the off-state, which could be repeated many times (Figures S8-S9).The only limitation that could arise from repeated drying is cumulative contaminations of the wall surfaces with impurities dissolved in the liquid, which could change the adhesion energy between the top crystal and the substrate.For this reason, we excluded acetone in our study, as it leaves residues.We could easily regenerate acetone-contaminated devices by exposing it to hot acetone baths, followed by IPA rinsing.
We identified two limiting factors for the successful elastocapillarity-induced nanoswitch.First, for the top channel wall to cave in under the capillary pressure, it must be flexible enough, which we call the caving-in criterion.Second, for closed channels to open upon rewetting, adhesion should not overcome wetting: this is the reversibility criterion.In both cases, the bending response of the top wall is crucial.Previously, the stretching and bending response of 2D materials have been studied with the so-called 'blister test' whereby a uniform pressure is applied to a 2D material suspended over a circular hole 33 .The stiffness of multilayer van der Waals materials was characterized recently using the same approach, yielding bending stiffnesses ranging from 10 −14 to 10 −13 J for crystal thicknesses in the range of 10-20 nanometers 34 .

Capillarity vs. Stiffness: the caving-in criterion
The caving-in of the nanochannel is determined by the relative magnitudes of the elastic force coming from the stiffness of the top wall, and the capillarity force.The bending stiffness  of a thin film of thickness  is expected to scale as  ∼  3 , and consequently, channels with a thin top crystal cave in more easily than those with thicker top.Wider channels should cave in more easily under a given capillary pressure, and we observed this in Figure 2g.Channels with  = 420 nm remained open upon water drying, whereas slightly wider channels with  = 520 nm caved in (both channels have height ℎ = 17 nm and top wall thickness  = 22 nm).
We calculated the caving-in criterion using the instability arguments when balancing capillary pressure with the bending stiffness of the channel: 31,35  4 /ℎ 2 > 1 (1) Details of the calculations are given in Supplementary materials.Here we introduced the wetting surface energy  =  (cos   + cos   ) of the channel 34 , given by the contact angle between the liquid and the substrate (  ) and top wall (  ).The prefactor  is set by the boundary conditions 35 and reads  = 1/96.We used  = 65 ∘ for thick 2D material-water interfaces 36 , and  = 0 ∘ for organic solvents which exhibit perfect wetting and for silicon dioxide-water interface 37 .We determined the geometrical parameters using atomic force microscopy, while bending stiffnesses were obtained from Wang et al. 34 and surface tension was taken from Park et al. 32 .The continuum medium assumption and the Young-Laplace formula are known to be valid down to few-nm confinement 16,38 .
In Figure 2g, we see two sets of nanochannels with different widths  off = 520 nm and  on = 420 nm, while all the other parameters remain identical.Upon drying with water, wider channels cave in, while narrower ones remain open.Using  = 10 −13 J for 22 nm-thick hBN 34 , equation (2) predicts a width threshold for caving in upon water removal of  th = 485 nm, aligning well with the experimental results,  on <  th <  off .As observed and predicted, the IPA surface tension is not high enough to trigger the caving-in for both sets of nanochannels (Figure S4).

Adhesion vs. Stiffness: collapsed channels
Accurately predicting the reversibility of caving-in -the capacity of collapsed channel to open upon wetting -is more complicated than the caving-in criterion.Interfacial properties of the adhering top and bottom walls may be affected by contaminant adsorption, chemical functionalization, and roughness of the surfaces.However, for 2D materials with smooth and reproducible surfaces, we could derive a reversibility criterion, as shown below, with sufficient accuracy to guide the design of our nanoscale switches.
To validate our method, we first derived the energy of dry, closed channels, and compared the calculated geometry of the collapsed channel with the experimental profile measured by AFM.The top crystal was modelled as an infinite plate with a bending stiffness , adhering to a stepshaped substrate with adhesion energy .As sketched in Figure 1b, due to its stiffness, the top crystal does not perfectly conform to the step and is suspended over a length  c .Our model (details in Supporting Information) yields a simple polynomial shape for the bending height profiles: (2) To experimentally test our model, we designed a slightly modified version of the switch device using WS2 directly exfoliated onto a SiO2 substrate patterned with photolithography, ensuring contamination-free interfaces and precise bending profiles (device D4).A top crystal, with terraced thickness ranging from  = 6 nm to  = 48 nm, was used to validate our modelpresented as an AFM height map in Figure 3a.The corresponding slope map in Figure 3b is calculated as a derivative of the height map, offering evidence that the suspended length increases with increasing thickness, while the slope decreases.The experimental AFM profiles presented in Figure 3c are very well fitted with equation ( 2).
The suspended length   minimizes the sum of the elastic energy and the adhesion energy (per unit length)  elas +  adh = 12 ℎ 2 / c 3 − ( − 2 c ) and links it to the material parameters  and .As  c depends on the height of the step as well as the material parameters, we define a geometry-independent parameter, the peeling curvature  ⋆ = �2/ = 6ℎ/ c 2 .It represents the minimum curvature needed to 'peel off' the crystal from its substrate, which is obtained for  = 0 and  =  c , as illustrated in Figure 1b.We can assume the adhesion energy to be thicknessindependent for the thick flakes employed here 39,40 , therefore, the measured peeling curvature changes only with the bending stiffness of the material.

Figure 3d
depicts the experimental variation of peeling curvature with the flake thickness.The peeling curvature is measured from the AFM scans as the curvature (second derivative) at the contact line between the top and bottom walls, where the adhesion between the walls balances the bending stiffness of the top wall.The data is best fitted to a power law  ⋆ ∼  −/2 (yielding a bending stiffness scaling  ∼   , as shown in Figure S3) with  = 2.88 ± 0.08, which is close to the expected value of 3 for layered materials without slippage between planes 41 , and very close to recent results using blister tests on molybdenum disulphide 34 .Our model is validated by: (a) the near-perfect fit between our model and measured AFM profiles (Figure S1); and (b) its quantitative agreement of with published results obtained with different experimental techniques (Figure S2).
Our method of stiffness/adhesion measurements has additional applications: it can be used to measure the adhesion energy between different van der Waals materials and substrates if the bending stiffness is independently determined by other techniques.Using stiffness values  for different crystal thicknesses from the literature 34 , we obtain  = 82 mJ/m 2 for WS2-SiO2 adhesion energy from the peeling curvature dependence on the thickness in the Figure 3d (we assumed that WS2 has a similar bending stiffness as MoS2).Previous studies of adhesion typically use spontaneously occurring blisters 42,43 , and thus rely on assumptions on the poorly characterized content of the blisters 44 .Our method could be used for a variety of interacting materials, addressing the discrepancies in the literature regarding 2D material adhesion energies 45,46 .

Adhesion vs. Stiffness vs. Capillarity: re-wetting and the reversibility criterion
The rewetting process starts with dry, closed channel with a strongly adhering region in the center, and two narrow side-capillaries defined by the side wall and bent portion of the top wall, and the base of width  c (see Figure 1b).When introducing the liquid, it creeps into the sidecapillaries and enlarge their base from the dry value  c to the new value  wet due to the added contribution of the wetting interaction to the overall energy of the system (see Figure S5).
To find the new equilibrium value of the suspended length  wet , we minimized the total energy  elas +  adh +  wet , where  elas +  adh is calculated above, and  wet = (cos   + cos   ) (see detailed derivation in Supporting Information).We achieve the full wetting when the base suspended length in the wet state becomes larger that the half width of the channel,  wet > /2.This is the reversibility criterion, when wetting completely releases the top wall and it corresponds to the following inequality:

Nanoswitching phase diagram
The elastocapillary-induced nanoswitch is achieved by choosing the right set of geometric parameters {, ℎ, } and materials {, , }, yielding at least 5 independent parameters.Introducing the dimensionless parameters  ≡  2  ⋆ /ℎ and  ≡ /, we reduced the complexity of this system to a two-dimensional space, and the universal nanoswitch criterion now reads: where the left inequality corresponds to the caving-in criterion and the right inequality to the reversibility criterion.The value of  is defined by the channel geometry and the materials choice, while  is defined by liquid and material interface properties.
The  −  phase diagram in Figure 4a summarizes the predictions of the nanoswitch criterion and compares them to the experimental results.The blue region corresponds to 'unbendable' channels which are too stiff to cave in under the liquid capillary pressure (for a given liquid), failing to pass the caving-in criterion.The red region corresponds to channels which fail to pass the reversibility criterion and remain closed even after rewetting.The white region passes both criteria and allows for reversible switching.Each experimental data point in Figure 4a represents a drying experiment followed by a check of the device configuration.White circles represent switchable channels that close upon drying and open upon re-wetting.Blue markers represent stiff channels that remain open all the time, and red markers represent channels that close irreversibly upon drying.The scale of color for the remaining markers represents the success rate for closing/irreversible collapse when multiple channels are involved, ranging from 0% (blue / red) to 100% (white), as in Figure 2. Near the transition line, there is a distribution of switchability of nominally equivalent channels, due to some channel-to-channel variability of the geometric and adhesion parameters.However, when moving away from this transition line, results are obtained deterministically.
Our experimental data shows good agreement with the predicted  −  phase diagram, demonstrating its usability in designing functional nanofluidic circuits (see below).The light red circle in the bottom-right part of the diagram only partially follows the expected irreversibility criterion, and this might be due to ill-defined interface between the bottom (SiO2) and top flake (hBN), possibly affected by contaminations of surface roughness.For this configuration, only 1 out of 5 nanochannels is irreversible.However, overestimating irreversibility is not a significant issue when designing switches, since we are mostly concerned to be either in the stiff or the switchable regime.
Van der Waals nanoslits with heights set by the thickness of monolayer/bilayer graphene spacers have been used to explore a variety of nanofluidic properties 4,22,23,47 .The design constraints for such structures have been empirically established: for 0.7 nm-high, 130 nm-wide channels to remain stiff, one must use top crystals thicker than 50 nanometers 22 .Our analysis supports this observation, denoted as a star on Figure 4a, and those parameters are found within stiff region.Our results suggest that the geometrical criterion could be relaxed even further when performing nanofluidic experiments -even if a nanochannel is in the `switchable' region, it could readily recover its shape upon wetting, making them suitable for liquid and ion transport experiments despite caving-in in the dry state.For low , channels do not cave in upon liquid removal; this is the stiff region (blue).For high  and low , the channels irreversibly collapse on the substrate (red).The remaining space is the switchable region, where channels undergo on/off transitions during wetting/drying (white).The star denotes the mechanical stability upper limit empirically established for atomically thin 2D nanoslits 22

Nano-capsule with zeptoliter volume
The nanoswitch could be used in two ways: (1) it could react to changes in the fluid medium through its surface-tension sensitive shape response or (2) nanofluidic circuits could have switchable parts with geometry-sensitive response that could modify their structure and function.
To demonstrate the latter, we used the  −  phase diagram to design a nano-capsule -an active nanofluidic system consisting of switchable gates delimiting a stiff narrower container (Fig 4b).The gates are nanochannels (width   = 2 μm) that switch off due to capillarity, while the container is a narrower section of the channel (width   = 600 nm) that does not cave in.The height of the channels is ℎ = 37 nm, the top wall is made of hBN and the bottom from graphene.The nano-capsule parameters are presented in the  −  phase diagram in Figure 4a as squares: the switch has  ≈ 23 (switchable region) and the stiff container has  ≈ 4 (out of scale).
In Figure 4c, the nano-capsule has open gates, as it can be seen in optical (top) and AFM (bottom) image.In Figure 4d, the gates were closed by elastocapillarity, deliming a container with a volume in range of ~100 zL, which could realistically be scaled further down.Figure 4f compares the range of enclosed liquid volumes accessible with nano-capsules with volumes of range of bacteria and viruses.A time sequence of the drying process is provided in Figure S6, showing the successful trapping of liquid for ~10 seconds.This trapping time, sufficient to observe fast confined phenomena, could be improved significantly through optimizing the leakage between the walls and maximizing the gate length.It is worth noting that, in case where electrolytes and solute are present, their concentration in a nano-capsule could diverge from the bulk concentration due to the drying dynamics.
Slit-shaped 2D van der Waals nanochannels are a unique platform for the study of a wide range of properties of confined fluids 3,4 .In this work, we have demonstrated the switching behavior of 2D nanochannels, driven by elastocapillarity, and developed a theoretical framework to explain the phenomenon and rationally design such nanoswitches.Switchable nanochannels should be designed in two steps: (1) choosing the top wall materials which set  and  ⋆ and (2) identifying the right spacer dimension ratio  2 /ℎ.
As we employ stiff but strong van der Waals materials as nanochannel walls, we could design nanofluidic switches operating at the single-digit nanometer scale.Previously, capillarity-switched adhesion was achieved in millimeter-sized channels using electroswitching 48 , but these structures rely on soft elastomers that limit their miniaturization below the micron scale.
We also designed a functional nano-capsule consisting of two switchable gates enclosing a stiff container, which allowed us to confine a zeptoliter-scale volume by using elastocapillarity to switch off the gates.These nano-capsules provide an exciting opportunity to explore phenomena at extremely small volumes, such as those found in viruses or below.As the walls of the nanocapsules are made of atomically smooth van-der-Waals materials with controllable surface chemistry, they could serve as a versatile platform for investigating nanoconfined biochemistry and chemistry 49 , as well as being incorporated into shape-programmable intelligent materials or used as active elements in integrated nanofluidic circuitry.

Fabrication
Patterning of spacers was done using electron beam lithography (JEOL JBX-6300FS) or photolithography (LW45B).The pattern was written on a polymer mask (PMMA and S1805 for ebeam or photolithography, respectively) and transferred to the substrate using deep reactive ion etching (Oxford Plasma Pro Cobra 100) with O2 and SF6 and CHF3 gases for etching graphite and SiO2, respectively.

Imaging
The optical contrast of the images, resulting from thin film interference, was a function of the spacer thickness as well as that of other layers.Rather than identifying the wavelength of optimal contrast, we recorded RGB images and used the channel with the most contrast.Optical images were acquired with an Olympus CX microscope in bright-field mode with a 100X objective using white LED illumination.For device D2, the micrographs present only the red component of the color camera, as the green and blue components were found not to contribute significantly to the optical contrast.Conversely, in device D3, the green channel had the most contrast, as shown in Figure S7.The selected channel of the RGB images underwent a linear contrast enhancement.
Atomic force microscopy was performed with a Bruker FastScan AFM in tapping mode.Supercritical CO2 drying was performed using Leica EM CPD300.

Wetting/drying experiments
Channels were immersed in isopropanol, which was solvent exchanged by transferring the wet chip to a beaker containing the desired liquid.We then let channels dry under the optical microscope or by directly blow-drying nitrogen gas.In Figure 2a-f, closed channels were counted optically as being dark channels, between 0 and 15 in the region of interest.In cases where partial collapse was observed, a fraction corresponding to the closed length divided by the total length was assigned.

Detailed derivation of the bending profile model
We use a 1D continuum mechanics model adapted from a similar system 1 for the bending profile H(x) of a thin elastic flake conforming to a step-shaped substrate.The flake is clamped on the step substrate for  < 0, and is suspended over a length   at which it touches the substrate.The flake profile satisfies: •  ′′′′ () = 0 for 0 <  <   as there is no load along the suspended part.We neglect longrange van der Waals interactions with respect to contact adhesion.Including them would lead to a correction of few % in the estimated parameters.Thus, the profile is a third-order polynomial () =   3 +   2 +   + .• The following natural boundary conditions: (i) (  ) = 0: the flake follows the step.(iii) ′ (0) =  ′ (  ) = 0: the flake is clamped by adhesion.The clamping boundary condition is supported by the experimental observation of zero slope at the contact points as well as previous measurements showing a high shear stress at the 2D material-silicon oxide interface 2 .In other words, the flake cannot slip on the SiO2 substrate.For simplicity, we set   and ℎ as unit lengths and determine the scale-free bending profile Λ(X), defined with  ∶=    and Λ ∶=  ℎ . Solving the boundary conditions system yields the coefficients of the polynomial describing the flake profile: For now, we only used geometric boundary conditions.The measured value of   minimizes the total energy  elas +  adh .The flake elastic energy per unit length is given by elas = Using the polynomial expression for the profile, we obtain  elas = � collapse to the curve given by eq. 2, proving that we indeed derived the analytical solution (dashed line).

Caving-in criterion
The collapse of flexible channels under capillary forces has been investigated experimental and theoretically at larger scales 3,4 .We employ their calculations and revisit their phenomenological assumptions to suit our nanometer length-scales -leading to the caving-in criterion for our devices.We introduce the deflection  of the top wall due to the capillary pressure, and the relative deflection  = /ℎ.The deflection in the center along the width of the channel, and at the lowest point along the length of the channel will be given by balance of the strain energy and applied pressure: Where  = 1/96,  is the width of the channel, ℎ is the height of the channel, and   is the driving pressure that deforms the membrane, in our case the capillary pressure.The Young-Laplace formula for capillary pressure reads 5 : However, the capillary pressure is defined not necessary at the point of the highest deflection   , but it could be defined at some other deformation point   =   .The  is a phenomenological parameter, which considers a) bending of the channel along its length from the lowest towards the dry part of the channel; b) extension of the meniscus; and c) modification of the continuum physics at the length scales below several nanometers 6,7 (the latter could be important in our system).Such effect would lead to reduction of the driving pressure by factor  compared to the maximum capillary pressure expected that the highest deflection point.Combining the equation (S 1) with the capillary pressure at position   , we get expression: 4ℎ 2 = 0 (S 3) The above quadratic equation has no real solutions for: (S 4) leading to the collapse of the channels in that case.
For the phenomenological parameter , van Honschoten et al 4 assumed the value of  = 1/2 ("only a motivated estimate"), as it supported their experiments well.Anoop et al 3 followed their lead.This assumption fitted well the experimental results for their large channels.
In our case, we assume the parameter is  = 1, due to much smaller length scales over which the meniscus develops in our devices, and the rigidity of or membranes.This value is supported by our experimental results and leads to the caving-in criterion (equation 1 in the main text).
To get a more precise estimate of , a numerical simulation should be performed.The resulting gain in precision might not have practical benefits, as it would be below the threshold of the device-to-device uncertainty and variability.The benefit of our Nanoswitch Phase Diagram lies in the fact that it could quickly offer good design decision when developing switching circuitry and could give insights on the influence of different parameters (solvents, materials, geometry)without extensive simulations.
An alternative derivation of the caving-in criterion, leading to the same results, starts from the energy expression for channel undergoing bending of the top wall due to capillarity reads: Where we introduced the effective spring constant of the channel  = 4 ϕ 4 and the wetting surface energy  =  (cos   + cos   ) of the channel.The channels will collapse if the energy decreases ( dΨ d < 0) and equation (S 5) does not have local energy minima in the range 0 <  < 1, that is, For the collapse channels, there should be no local minima in energy expression, hence the expression (S 6) should not have any real solutions.This leads to the requirement 4 ℎ 2 > 1, and to the caving-in criterion in the main text (see equation 1, main text).This energy minimization requirement is equivalent to the requirement dΨ d � = 1 2 � < 0. See Figure S4 for the evolution of the energy with the relative deflection for different device parameters.

Reversibility criterion
The reversibility criterion can be obtained by considering an adhered, wet configuration (same as in Fig. 1b but with the gap under the suspended length  filled with liquid, see Fig. S5) sketched here.The profile () is still given by the polynomial expression but it is no longer parametrized by the dry, equilibrium value   but rather by a parameter .Introduction of the liquid into the side capillary adds wetting energy to the calculations, leading to a new value of  ≥   .The filling pathway in Figure S5 requires that the side capillary is first filled with water, which could be a comparatively slower process that drying.The value of the suspended length  in wet conditions is set by the channel wetting energy   on top of the elastic energy and adhesion energy introduced in the main text.The equilibrium value of all these components is given by: As in the main text, reasoning on the half-channel above, one obtains:  elas +  adh = 6 − �, only the wetting energy remains to be computed.It is given by integrating the wetting energy   = −�  cos   +   cos   �, where   is the contact angle between the liquid and the material of the top surface, and   is the contact angle at the bottom surface, i.e. substrate.Using contour integral, we calculate: We replace () by its polynomial expression (equation 2, main text) and obtain: If we assume the same narrow channel approximation (equation S1), equivalent to (ℎ   ⁄ ) 2 ≪ 1, we derive the wetting energy as: wet =   (cos   + cos   ) The energy balance (equation S3) must now be solved to yield an equilibrium value   .Two scenarios may occur: wetting does not release the walls (irreversible collapse) wetting releases the wall.
We therefore solve the equation   =

Figure 1 .
Figure 1.Elastocapillarity-switched adhesion in nanochannels (a) Sketch of a nanochannel device in the stiff configuration.(b) Nanochannel in its caved-in state, where the top flake adheres to the substrate. ⋆ is the peeling curvature parameter and  ⋆ −1 thus corresponds to the radius of curvature (dashed circle).(c) Upon drying the channel, capillary pressure triggers the caving-in of the top wall (d) Calculated strain map in the bent cross-section using blue for compressive and red for tensile strain.The strain color scale refers to device D1, presented in (e,f) AFM height maps of hBN/Gr/SiO2 nanochannels in their stiff and caved-in configurations, respectively

Figure 2 .
Figure 2. Visualizing and quantifying the nanoswitch optically and with AFM.(a-c) Optical micrographs of nanochannel device D2 after drying with different liquids.The bright and dark grey lines correspond to open or collapsed nanochannels, respectively.(d,e) Correlating the optical image to AFM profiles of channels after varying drying conditions.(f) Caved-in channels in the thick top region were optically counted as in (b) after drying with liquids of different surface tensions.IPA/water mixtures were used to interpolate the surface tension from 21 to 72 mN/m.Error bars correspond to standard deviations over 3 wetting/drying measurements.(g) Visualizing the width threshold for caving under capillary pressure: AFM map of hBN/Gr/SiO2 device D3 with channels of two different widths, switched by water capillarity stimulus.The bottom-right half (dark) of the image presents open spacers, with ℎ = 17 nm high graphene sidewalls.Top-left (bright) part shows the same spacers topped with  = 22 nm thick hBN top wall, defining the nanochannels -the upper set of channels is open, while the lower is collapsed.

Figure 3 .
Figure 3. Adhesion/stiffness analysis of closed channels in device D4, obtained by exfoliating a terraced WS2 crystal on SiO2 spacers.(a) AFM height map of the collapsed nanochannels with varying top wall thickness  ranging from 6 to 48 nm.(b) Slope extracted from the height map showing that the width of the transition zone increases with crystal thickness.(c) AFM profiles extracted along lines in the white dashed zone of (a) following the lines shown in (b).The dots are experimental points, and the solid black lines are the best fit to the polynomial profile obtained in our model.The top layer thickness was subtracted from the profiles.The x and y axis follow the convention defined in Fig. 1.(d) Peeling curvature  ⋆ extracted from the profiles in (c), as a function of the crystal thickness.The dashed line is the best fit to a power law  ⋆ ∼  −/2 , yielding  = 2.88 ± 0.08.

Figure 4 .
Figure 4. Generalization and application of the nanoswitch.(a) Universal nanoswitch phase diagram.The dimensionless parameter  =  2  ⋆ /ℎ defines the channel geometrydependent flexibility, and  = / defines the material wettability/adhesion ratio.Markers represent experiments for different geometry, solvents, and materials.Different regions in the parameter space are color-coded.For low , channels do not cave in upon liquid removal; this is the stiff region (blue).For high  and low , the channels irreversibly collapse on the substrate (red).The remaining space is the switchable region, where channels undergo on/off transitions during wetting/drying (white).The star denotes the mechanical stability upper limit empirically established for atomically thin 2D nanoslits22 .Squares denote parts of the nano-capsule: the open square is the switch part, and the blue square is for the container (off-scale, real value for container is  ≈ 4).(b) A sketch of a self-sealing nano-capsule, consisting of a narrow stiff nanocontainer, delimited by two Figure 4. Generalization and application of the nanoswitch.(a) Universal nanoswitch phase diagram.The dimensionless parameter  =  2  ⋆ /ℎ defines the channel geometrydependent flexibility, and  = / defines the material wettability/adhesion ratio.Markers represent experiments for different geometry, solvents, and materials.Different regions in the parameter space are color-coded.For low , channels do not cave in upon liquid removal; this is the stiff region (blue).For high  and low , the channels irreversibly collapse on the substrate (red).The remaining space is the switchable region, where channels undergo on/off transitions during wetting/drying (white).The star denotes the mechanical stability upper limit empirically established for atomically thin 2D nanoslits22 .Squares denote parts of the nano-capsule: the open square is the switch part, and the blue square is for the container (off-scale, real value for container is  ≈ 4).(b) A sketch of a self-sealing nano-capsule, consisting of a narrow stiff nanocontainer, delimited by two

Figure
Figure S1

Figure S2 Figure
Figure S2