### Complete PDF Viewer Example (C#)
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
This C# code provides the logic for the PDF viewer UI. It initializes the viewer with a sample PDF, handles page changes, link taps, errors, and implements toolbar button actions for navigation and zoom.
```csharp
public partial class PdfPage : ContentPage
{
public PdfPage()
{
InitializeComponent();
pdfViewer.Source = PdfSource.FromAsset("sample.pdf");
}
private void OnDocumentLoaded(object sender, DocumentLoadedEventArgs e)
{
statusLabel.Text = $"Loaded: {e.PageCount} pages - {e.Title}";
}
private void OnPageChanged(object sender, PageChangedEventArgs e)
{
statusLabel.Text = $"Page {e.PageIndex + 1} of {e.PageCount}";
}
private void OnLinkTapped(object sender, LinkTappedEventArgs e)
{
if (e.Uri != null)
{
// Intercept and handle external link yourself
DisplayAlert("Link Tapped", $"Opening: {e.Uri}", "OK");
Launcher.OpenAsync(e.Uri);
// Prevent default navigation
e.Handled = true;
}
else if (e.DestinationPage.HasValue)
{
// Internal link - allow default navigation
// Or set e.Handled = true to prevent it
}
}
private void OnError(object sender, PdfErrorEventArgs e)
{
DisplayAlert("Error", e.Message, "OK");
}
private void OnPreviousPage(object sender, EventArgs e)
{
if (pdfViewer.CurrentPage > 0)
pdfViewer.GoToPage(pdfViewer.CurrentPage - 1);
}
private void OnNextPage(object sender, EventArgs e)
{
if (pdfViewer.CurrentPage < pdfViewer.PageCount - 1)
pdfViewer.GoToPage(pdfViewer.CurrentPage + 1);
}
private void OnZoomIn(object sender, EventArgs e)
{
pdfViewer.Zoom = Math.Min(pdfViewer.Zoom + 0.5f, pdfViewer.MaxZoom);
}
private void OnZoomOut(object sender, EventArgs e)
{
pdfViewer.Zoom = Math.Max(pdfViewer.Zoom - 0.5f, pdfViewer.MinZoom);
}
}
```
--------------------------------
### Add MauiNativePdfView NuGet Package
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Install the MauiNativePdfView package using the .NET CLI. Ensure you are using .NET 9.0 or later.
```bash
dotnet add package MauiNativePdfView
```
--------------------------------
### Complete PDF Viewer Example (XAML)
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
This XAML defines the UI for a complete PDF viewer, including a toolbar for navigation and zoom, the PdfView control itself, and a status bar to display information.
```xml
```
--------------------------------
### Install MauiNativePdfView via Package Manager Console
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Install the MauiNativePdfView package using the Package Manager Console in Visual Studio. Ensure you are using .NET 9.0 or later.
```powershell
Install-Package MauiNativePdfView
```
--------------------------------
### Configure MauiApp with PdfView Handler
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Add the UseMauiNativePdfView() extension method to your MauiProgram.cs file to register the PDF view handler. This is a required setup step.
```csharp
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp()
.UseMauiNativePdfView() // <--- ADD THIS LINE
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
});
return builder.Build();
}
}
```
--------------------------------
### Handle Deep Links in PDF Viewer
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Process custom URL schemes (e.g., 'myapp://') within the PDF viewer by using the LinkTapped event. This example navigates using Shell.Current.GoToAsync after stripping the scheme prefix. 'e.Handled = true' prevents default navigation.
```csharp
pdfViewer.LinkTapped += async (sender, e) =>
{
if (e.Uri?.StartsWith("myapp://") == true)
{
// Handle custom URL scheme
await Shell.Current.GoToAsync(e.Uri.Replace("myapp://", ""));
e.Handled = true;
}
};
```
--------------------------------
### Track PDF Link Clicks for Analytics
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Log PDF link clicks using the LinkTapped event. This example demonstrates tracking the document, link URI or page number, and current page for analytics purposes. Navigation is allowed by default.
```csharp
pdfViewer.LinkTapped += (sender, e) =>
{
// Log the link click
Analytics.TrackEvent("PDF_Link_Clicked", new Dictionary
{
{ "Document", pdfViewer.Source?.ToString() ?? "Unknown" },
{ "Link", e.Uri ?? $"Page {e.DestinationPage}" },
{ "CurrentPage", pdfViewer.CurrentPage.ToString() }
});
// Allow normal navigation
e.Handled = false;
};
```
--------------------------------
### Enable Custom Tap Gestures on PDF Pages
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Enable custom tap detection on PDF pages to get coordinates. When disabled, the viewer uses native link detection. Useful for custom UI elements or annotations.
```csharp
pdfViewer.EnableTapGestures = true;
pdfViewer.Tapped += (sender, e) =>
{
Console.WriteLine($"Tapped page {e.PageIndex} at ({e.X}, {e.Y})");
// Add your custom tap handling logic
// For example: show a custom menu, add annotations, etc.
};
```
--------------------------------
### Build MauiNativePdfView from Source
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Clone the repository, navigate to the project directory, and restore dependencies before building. This is the standard procedure for setting up the project locally.
```bash
git clone https://github.com/TheEightBot/MauiNativePdfView.git
cd MauiNativePdfView
dotnet restore
dotnet build
```
--------------------------------
### Build MauiPdfViewerSample
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Navigate to the sample application directory and build it to test the PDF viewer functionality. This command assumes the main project has already been built.
```bash
cd samples/MauiPdfViewerSample
dotnet build
```
--------------------------------
### Create PdfSource from URI
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Use `PdfSource.FromUri` to load a PDF from a web address or a `Uri` object. An optional password can be provided for encrypted PDFs.
```csharp
// URI/URL
var source = PdfSource.FromUri(Uri uri, string? password = null);
```
--------------------------------
### Custom Link Handling with Confirmation
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Implement custom logic for handling tapped links, such as prompting the user for confirmation before opening an external URI using the Launcher. Set 'e.Handled = true' to prevent default navigation after custom handling.
```csharp
pdfViewer.LinkTapped += async (sender, e) =>
{
if (e.Uri != null)
{
var result = await DisplayAlert(
"Open Link?",
$"Do you want to open {e.Uri}?",
"Yes",
"No"
);
if (result)
{
await Launcher.OpenAsync(e.Uri);
}
e.Handled = true; // Prevent default navigation
}
};
```
--------------------------------
### Create PdfSource from File Path
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Use `PdfSource.FromFile` to load a PDF from a local file path. An optional password can be provided for encrypted PDFs.
```csharp
// File path
var source = PdfSource.FromFile(string filePath, string? password = null);
```
--------------------------------
### Create PdfSource from Asset
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Use `PdfSource.FromAsset` to load a PDF from an application asset. An optional password can be provided for encrypted PDFs.
```csharp
// Asset/Resource
var source = PdfSource.FromAsset(string assetName, string? password = null);
```
--------------------------------
### Create PdfSource from Stream
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Use `PdfSource.FromStream` to load a PDF from a `Stream`. An optional password can be provided for encrypted PDFs.
```csharp
// Stream
var source = PdfSource.FromStream(Stream stream, string? password = null);
```
--------------------------------
### Create PdfSource from Byte Array
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Use `PdfSource.FromBytes` to load a PDF from a byte array. An optional password can be provided for encrypted PDFs.
```csharp
// Byte array
var source = PdfSource.FromBytes(byte[] data, string? password = null);
```
--------------------------------
### PdfSource Implicit Conversion
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Demonstrates the convenience of implicit conversion for PdfSource from strings and URIs.
```APIDOC
## PdfSource Implicit Conversion
### Description
Demonstrates the convenience of implicit conversion for `PdfSource` from strings and URIs, allowing for more concise code.
### Usage
**String to PdfSource - auto-detects type:**
```csharp
PdfSource source = "https://example.com/doc.pdf"; // → UriPdfSource
PdfSource source = "sample.pdf"; // → AssetPdfSource
PdfSource source = "/path/to/file.pdf"; // → FilePdfSource
```
**Uri to PdfSource:**
```csharp
PdfSource source = new Uri("https://example.com/doc.pdf");
```
### String Conversion Rules:
| Pattern | Result |
|---------|--------|
| `http://...` or `https://...` | `UriPdfSource` |
| `asset://filename.pdf` | `AssetPdfSource` |
| `file:///path/to/file.pdf` | `FilePdfSource` |
| `filename.pdf` (no path separators) | `AssetPdfSource` |
| `/path/to/file.pdf` (rooted path) | `FilePdfSource` |
```
--------------------------------
### PdfViewer Methods
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Essential methods for interacting with the PdfViewer, such as navigating to a specific page or reloading the document.
```APIDOC
## PdfViewer Methods
### Description
Essential methods for interacting with the `PdfViewer`, such as navigating to a specific page or reloading the document.
### Methods
- **GoToPage**(int pageIndex): Navigates to a specific page (0-based).
- **Reload**(): Reloads the current document.
```
--------------------------------
### Navigate to Specific Page
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Use the `GoToPage` method to navigate to a specific page in the PDF document. Page indexing is 0-based.
```csharp
// Navigate to specific page (0-based)
pdfViewer.GoToPage(int pageIndex);
```
--------------------------------
### Implicit Uri to PdfSource Conversion
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
The `PdfSource` class supports implicit conversion from `Uri` objects.
```csharp
// Uri to PdfSource
PdfSource source = new Uri("https://example.com/doc.pdf");
```
--------------------------------
### PdfSource Factory Methods
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Factory methods for creating PdfSource objects from various sources like files, URIs, streams, byte arrays, and assets.
```APIDOC
## PdfSource Factory Methods
### Description
Factory methods for creating `PdfSource` objects from various sources like files, URIs, streams, byte arrays, and assets. These methods facilitate easy loading of PDF documents into the viewer.
### Methods
- **FromFile**(string filePath, string? password = null): Creates a `PdfSource` from a file path.
- **FromUri**(Uri uri, string? password = null): Creates a `PdfSource` from a URI.
- **FromStream**(Stream stream, string? password = null): Creates a `PdfSource` from a stream.
- **FromBytes**(byte[] data, string? password = null): Creates a `PdfSource` from a byte array.
- **FromAsset**(string assetName, string? password = null): Creates a `PdfSource` from an asset name.
```
--------------------------------
### Enable Tap Gestures in PdfViewer
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Set `EnableTapGestures` to true to activate tap gesture recognition within the PDF viewer. Be aware that this may interfere with native link handling on some platforms.
```csharp
pdfViewer.EnableTapGestures = true;
```
--------------------------------
### MVVM Pattern for PDF Viewer (XAML Binding)
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
This XAML snippet demonstrates how to bind the PdfView control's properties to a ViewModel using the MVVM pattern. It shows binding for Source, CurrentPage, and PageCount.
```xml
```
--------------------------------
### MVVM Pattern for PDF Viewer (ViewModel)
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
This C# code defines a ViewModel for the PDF viewer using the MVVM pattern. It includes properties for PDF source, current page, and page count, along with commands for loading and navigating PDFs.
```csharp
public class PdfViewModel : INotifyPropertyChanged
{
private PdfSource _pdfSource;
private int _currentPage;
private int _pageCount;
public PdfSource PdfSource
{
get => _pdfSource;
set => SetProperty(ref _pdfSource, value);
}
public int CurrentPage
{
get => _currentPage;
set => SetProperty(ref _currentPage, value);
}
public int PageCount
{
get => _pageCount;
set => SetProperty(ref _pageCount, value);
}
public Command LoadPdfCommand { get; }
public Command GoToPageCommand { get; }
public PdfViewModel()
{
LoadPdfCommand = new Command(LoadPdf);
GoToPageCommand = new Command(GoToPage);
}
private void LoadPdf()
{
PdfSource = PdfSource.FromAsset("document.pdf");
}
private void GoToPage(int pageIndex)
{
// Page navigation handled by binding
}
}
```
--------------------------------
### Subscribe to LinkTapped Event (C#)
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Attach an event handler to the `LinkTapped` event in C# code-behind to respond to tapped links within the PDF. Ensure the event handler method is defined.
```csharp
pdfViewer.LinkTapped += OnLinkTapped;
```
--------------------------------
### Add Constructor to Generated Class
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/src/MauiNativePdfView.Android.Binding/Additions/AboutAdditions.txt
Extend a generated partial class with a new constructor that calls an existing one. This allows for more flexible object instantiation.
```csharp
public partial class Rectangle
{
public Rectangle (Point location, Size size) :
this (location.X, location.Y, size.Width, size.Height)
{
}
}
```
--------------------------------
### Implicit String to PdfSource Conversion
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
The `PdfSource` class supports implicit conversion from strings, automatically detecting the source type (Uri, Asset, or File).
```csharp
// String to PdfSource - auto-detects type
PdfSource source = "https://example.com/doc.pdf"; // → UriPdfSource
PdfSource source = "sample.pdf"; // → AssetPdfSource
PdfSource source = "/path/to/file.pdf"; // → FilePdfSource
```
--------------------------------
### Password-Protected PDFs
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
This C# code snippet shows how to load a password-protected PDF file. It includes a try-catch block to handle potential exceptions, such as an incorrect password.
```csharp
try
{
pdfViewer.Source = PdfSource.FromFile("encrypted.pdf", "mypassword");
}
catch (Exception ex)
{
// Handle incorrect password
await DisplayAlert("Error", "Invalid password", "OK");
}
```
--------------------------------
### PdfView Properties
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Configurable properties for the PdfView component to customize its appearance and behavior.
```APIDOC
## PdfView Properties
### Description
Configurable properties for the PdfView component to customize its appearance and behavior.
### Properties
- **Source** (PdfSource) - Required - PDF source to display
- **EnableZoom** (bool) - Optional - Enable pinch-to-zoom. Default: `true`
- **EnableSwipe** (bool) - Optional - Enable swipe gestures. Default: `true`
- **EnableTapGestures** (bool) - Optional - Enable tap interception. Default: `false`
- **EnableLinkNavigation** (bool) - Optional - Enable clickable links. Default: `true`
- **Zoom** (float) - Optional - Current zoom level. Default: `1.0f`
- **MinZoom** (float) - Optional - Minimum zoom level. Default: `1.0f`
- **MaxZoom** (float) - Optional - Maximum zoom level. Default: `3.0f`
- **PageSpacing** (int) - Optional - Spacing between pages (pixels). Default: `10`
- **FitPolicy** (FitPolicy) - Optional - How pages fit on screen. Default: `Width`
- **DisplayMode** (PdfDisplayMode) - Optional - Page display mode. Default: `SinglePageContinuous`
- **ScrollOrientation** (PdfScrollOrientation) - Optional - Scroll direction. Default: `Vertical`
- **DefaultPage** (int) - Optional - Initial page (0-based). Default: `0`
- **EnableAntialiasing** (bool) - Optional - Antialiasing (Android only). Default: `true`
- **UseBestQuality** (bool) - Optional - Best quality rendering. Default: `true`
- **BackgroundColor** (Color) - Optional - Viewer background color. Default: `null`
- **EnableAnnotationRendering** (bool) - Optional - Show PDF annotations. Default: `true`
- **CurrentPage** (int) - Readonly - Current page (0-based)
- **PageCount** (int) - Readonly - Total pages
```
--------------------------------
### Intercept Link Taps in PDF Viewer
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Handle link taps before navigation occurs. Set 'e.Handled = true' to prevent default navigation. Useful for custom link processing or blocking specific URLs.
```csharp
pdfViewer.LinkTapped += (sender, e) =>
{
Console.WriteLine($"Link tapped: {e.Uri}");
if (e.Uri?.Contains("example.com") == true)
{
// Custom handling for specific domain
DisplayAlert("Info", "This link is not allowed", "OK");
e.Handled = true; // Prevent navigation
}
else if (e.Uri != null)
{
// Log analytics before opening
Analytics.TrackEvent("PDF_Link_Clicked", new Dictionary
{
{ "Uri", e.Uri }
});
// Allow default navigation (or handle manually)
e.Handled = false;
}
};
```
--------------------------------
### Load PDF Document via Code-Behind
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Load PDF documents programmatically using the PdfSource static methods for various sources like files, URLs, assets, streams, or byte arrays. Supports password-protected PDFs.
```csharp
// From file
pdfViewer.Source = PdfSource.FromFile("/path/to/document.pdf");
// From URL
pdfViewer.Source = PdfSource.FromUri(new Uri("https://example.com/doc.pdf"));
// From embedded asset
pdfViewer.Source = PdfSource.FromAsset("sample.pdf");
// From stream
pdfViewer.Source = PdfSource.FromStream(myStream);
// From byte array
pdfViewer.Source = PdfSource.FromBytes(pdfBytes);
// With password
pdfViewer.Source = PdfSource.FromFile("/path/to/encrypted.pdf", "password");
```
--------------------------------
### Restrict External Navigation in PDF Viewer
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Use the LinkTapped event to intercept external HTTP links and prevent them from opening. Set 'e.Handled = true' to block default navigation.
```csharp
pdfViewer.LinkTapped += (sender, e) =>
{
if (e.Uri != null && e.Uri.StartsWith("http"))
{
DisplayAlert("Restricted", "External links are not allowed", "OK");
e.Handled = true; // Block navigation
}
};
```
--------------------------------
### Basic PdfView XAML Usage
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Use the PdfView control in your XAML. You can bind the Source property directly to a string URL or configure it with various properties and event handlers.
```xml
```
--------------------------------
### Subscribe to LinkTapped Event (XAML)
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Declare the `LinkTapped` event handler directly in XAML for the `PdfView` control. This provides a declarative way to wire up event handlers.
```xml
```
--------------------------------
### Add PDF View Namespace to XAML
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Declare the necessary XML namespace for the PDF view components in your XAML file. Choose either the custom schema (recommended) or the CLR namespace.
```xml
xmlns:pdf="http://eightbot.com/maui/pdfview"
```
```xml
xmlns:pdf="clr-namespace:MauiNativePdfView;assembly=MauiNativePdfView"
```
--------------------------------
### Reload Current Document
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
The `Reload` method can be called to refresh and reload the currently displayed PDF document.
```csharp
// Reload current document
pdfViewer.Reload();
```
--------------------------------
### Handle PDF Document Loaded Event
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Implement the DocumentLoaded event handler to access metadata about the loaded PDF, such as page count, title, and author. This event fires after the document has been successfully loaded.
```csharp
private void OnDocumentLoaded(object sender, DocumentLoadedEventArgs e)
{
Console.WriteLine($"Loaded: {e.PageCount} pages");
Console.WriteLine($"Title: {e.Title}");
Console.WriteLine($"Author: {e.Author}");
}
```
--------------------------------
### FitPolicy Enum
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Defines how PDF pages are scaled to fit the viewer's display area.
```csharp
// How pages fit on screen
public enum FitPolicy
{
Width, // Fit to width
Height, // Fit to height
Both // Fit both dimensions
}
```
--------------------------------
### PdfDisplayMode Enum
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Specifies the page display mode for the PDF viewer.
```csharp
// Page display mode
public enum PdfDisplayMode
{
SinglePage, // One page at a time
SinglePageContinuous // Continuous scrolling
}
```
--------------------------------
### Handle PDF Page Changed Event
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Implement the PageChanged event handler to track the current page index and total page count as the user navigates through the PDF document. Useful for UI updates or logging.
```csharp
private void OnPageChanged(object sender, PageChangedEventArgs e)
{
Console.WriteLine($"Page {e.PageIndex + 1} of {e.PageCount}");
}
```
--------------------------------
### Add Pure C# Class to Binding Library
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/src/MauiNativePdfView.Android.Binding/Additions/AboutAdditions.txt
Include a new C# class in the binding library that does not interact with Java. This is useful for creating helper classes or data structures.
```csharp
public class Point
{
public int X { get; set; }
public int Y { get; set; }
}
```
--------------------------------
### Disable All Link Navigation in PDF Viewer
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Completely disable link navigation in the PDF viewer either by setting 'pdfViewer.EnableLinkNavigation = false' or by intercepting all LinkTapped events and setting 'e.Handled = true'.
```csharp
// Simple approach
pdfViewer.EnableLinkNavigation = false;
// Or intercept all links
pdfViewer.LinkTapped += (sender, e) =>
{
e.Handled = true; // Block all navigation
};
```
--------------------------------
### Handle Annotation Taps on iOS
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Intercept taps on annotations within the PDF viewer on iOS. Set 'e.Handled = true' to prevent the default annotation behavior. This feature is specific to iOS and PDFKit.
```csharp
private void OnAnnotationTapped(object sender, AnnotationTappedEventArgs e)
{
Console.WriteLine($"Annotation on page {e.PageIndex + 1}");
Console.WriteLine($"Type: {e.AnnotationType}");
Console.WriteLine($"Contents: {e.Contents}");
Console.WriteLine($"Bounds: {e.Bounds}");
// Prevent default behavior if needed
e.Handled = true;
}
```
--------------------------------
### PdfView Source String Conversion in XAML
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
The PdfView control automatically converts string values for the Source property into appropriate PdfSource types (UriPdfSource, AssetPdfSource, File URI).
```xml
```
--------------------------------
### PdfScrollOrientation Enum
Source: https://github.com/theeightbot/mauinativepdfview/blob/main/README.md
Determines the scroll direction for the PDF viewer.
```csharp
// Scroll direction
public enum PdfScrollOrientation
{
Vertical, // Scroll up/down
Horizontal // Scroll left/right
}
```
=== COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.