npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

expo-sqlite-explorer

v0.2.0

Published

A SQLite database browser and explorer for Expo based React Native applications

Downloads

211

Readme

expo-sqlite-explorer

npm version npm downloads License: MIT

A SQLite database browser and explorer component for React Native and Expo applications. Provides a complete UI for browsing tables, viewing data, executing queries, and analyzing schema.

Features

  • Table Browser - Browse all tables with row counts
  • Data Grid - Paginated data view with sorting and filtering
  • Row Details - Modal view for full row inspection
  • SQL Query - Execute custom SELECT queries
  • Schema View - View columns, indexes, and foreign keys
  • DDL View - View CREATE TABLE statements
  • Column Statistics - Min/max values, null percentages, distinct counts
  • Export - Export data to CSV or JSON
  • Theming - Built-in light/dark themes with custom theme support
  • Clipboard - Copy cells, rows as JSON

Installation

npm install expo-sqlite-explorer
# or
yarn add expo-sqlite-explorer

Peer Dependencies

This package requires the following peer dependencies:

{
  "react": ">=18.0.0",
  "react-native": ">=0.72.0",
  "react-native-svg": ">=15.12.1",
  "expo-sqlite": ">=14.0.0",
  "expo-clipboard": ">=6.0.0",
  "mobx": ">=6.0.0",
  "mobx-react-lite": ">=4.0.0"
}

Usage

Basic Usage

import * as SQLite from "expo-sqlite";
import { SqliteExplorer, ExpoSqliteAdapter } from "expo-sqlite-explorer";

// Open your database
const db = await SQLite.openDatabaseAsync("myapp.db");

// Create adapter
const adapter = new ExpoSqliteAdapter({ database: db });

// Render explorer
<SqliteExplorer adapter={adapter} />;

With Dark Theme

import {
  SqliteExplorer,
  ExpoSqliteAdapter,
  darkTheme,
} from "expo-sqlite-explorer";

<SqliteExplorer adapter={adapter} theme={darkTheme} />;

Development-Only Mode

<SqliteExplorer
  adapter={adapter}
  devOnly={true} // Only renders when __DEV__ is true
/>

Custom Page Size

<SqliteExplorer
  adapter={adapter}
  pageSize={100} // Default is 50
/>

Custom Database Adapters

You can create custom adapters by implementing the IDatabaseAdapter interface:

import type { IDatabaseAdapter } from "expo-sqlite-explorer";

class MyCustomAdapter implements IDatabaseAdapter {
  isReady(): boolean {
    /* ... */
  }
  getTables(): Promise<TableInfo[]> {
    /* ... */
  }
  getColumns(tableName: string): Promise<ColumnInfo[]> {
    /* ... */
  }
  getIndexes(tableName: string): Promise<IndexInfo[]> {
    /* ... */
  }
  getForeignKeys(tableName: string): Promise<ForeignKeyInfo[]> {
    /* ... */
  }
  getTableDDL(tableName: string): Promise<string> {
    /* ... */
  }
  getColumnStatistics(tableName: string): Promise<ColumnStatistics[]> {
    /* ... */
  }
  query<T>(sql: string, params?: SqlParameter[]): Promise<QueryResult<T>> {
    /* ... */
  }
  getRowCount(
    tableName: string,
    filterColumn?: string,
    filterValue?: string
  ): Promise<number> {
    /* ... */
  }
  getRows<T>(tableName: string, options: PaginationOptions): Promise<T[]> {
    /* ... */
  }
}

Custom Theming

Create a custom theme by providing a SqliteExplorerTheme object:

import type { SqliteExplorerTheme } from "expo-sqlite-explorer";

const customTheme: SqliteExplorerTheme = {
  mode: "dark",
  colors: {
    background: "#1a1a2e",
    foreground: "#eaeaea",
    card: "#16213e",
    border: "#0f3460",
    primary: "#e94560",
    primaryForeground: "#ffffff",
    muted: "#1f4068",
    mutedForeground: "#a0a0a0",
    success: "#00d09c",
    successForeground: "#ffffff",
    warning: "#ffc107",
    warningForeground: "#000000",
    destructive: "#ff6b6b",
    destructiveForeground: "#ffffff",
  },
};

<SqliteExplorer adapter={adapter} theme={customTheme} />;

API Reference

SqliteExplorer Props

| Prop | Type | Default | Description | | ---------- | --------------------- | ------------ | -------------------------- | | adapter | IDatabaseAdapter | required | Database adapter instance | | theme | SqliteExplorerTheme | lightTheme | Theme configuration | | pageSize | number | 50 | Rows per page | | devOnly | boolean | false | Only render in development |

Exports

// Main component
import { SqliteExplorer } from "expo-sqlite-explorer";

// Adapter
import { ExpoSqliteAdapter } from "expo-sqlite-explorer";

// Themes
import { lightTheme, darkTheme } from "expo-sqlite-explorer";

// Types
import type {
  IDatabaseAdapter,
  SqliteExplorerTheme,
  TableInfo,
  ColumnInfo,
  ColumnStatistics,
} from "expo-sqlite-explorer";

## Development

To build the project locally:

```bash
# Install dependencies
npm install

# Compile TypeScript to dist/
npm run build

# Run TypeScript type check
npm run compile

License

MIT © Reza Ebrahimi