A Nuxt 4 module providing UI components, controls, and composables for transit and GTFS-related applications.
tlv2-ui is a comprehensive UI library built for Interline transit applications. It includes:
- Controls - General-purpose, domain-agnostic UI components (buttons, inputs, modals, tables, etc.)
- Components - Transit/GTFS-specific components (route icons, pathway maps, etc.)
- Composables - Vue composables for authentication, API endpoints, basemap layers, and more
- Utilities - Geometry helpers, library functions, and test utilities
yarn add tlv2-uiAdd the module to your nuxt.config.ts:
export default defineNuxtConfig({
modules: ['tlv2-ui'],
tlv2: {
// Module options
bulma: '',
useProxy: false,
loginGate: false,
// ... see ModuleOptions for all available options
}
})| Option | Type | Default | Description |
|---|---|---|---|
bulma |
string |
'' |
Bulma CSS configuration |
useProxy |
boolean |
false |
Enable API proxy |
proxyBase |
string |
- | Proxy base URL |
apiBase |
string |
- | API base URL |
loginGate |
boolean |
false |
Enable login gate |
requireLogin |
boolean |
false |
Require user login |
protomapsApikey |
string |
- | Protomaps API key |
nearmapsApikey |
string |
- | Nearmaps API key |
mixpanelApikey |
string |
- | Mixpanel API key |
auth0ClientId |
string |
- | Auth0 client ID |
auth0Domain |
string |
- | Auth0 domain |
auth0Audience |
string |
- | Auth0 audience |
auth0Scope |
string |
- | Auth0 scope |
auth0RedirectUri |
string |
- | Auth0 redirect URI |
auth0LogoutUri |
string |
- | Auth0 logout URI |
safelinkUtmSource |
string |
- | UTM source parameter for generated safelinks |
routes |
Partial<Record<Tlv2RouteKey, string>> |
- | Custom route overrides for TLV2 routes |
transferAnalystReadOnlyFeedSelector |
boolean |
false |
Enable read-only mode for feed selector in Transfer Analyst |
transferAnalystGtfsRealtimeStopObservations |
boolean |
false |
Enable GTFS-realtime stop observations in Transfer Analyst |
The module provides several subpath exports:
// Main module
import { ... } from 'tlv2-ui'
// Configuration utilities
import { ... } from 'tlv2-ui/config'
// Library utilities
import { ... } from 'tlv2-ui/lib'
// Geometry utilities
import { ... } from 'tlv2-ui/geom'
// Test utilities
import { ... } from 'tlv2-ui/testutil'General-purpose UI controls (prefixed with t-):
t-button- Button componentt-card- Card containert-checkbox- Checkbox inputt-datepicker- Date pickert-dropdown- Dropdown menut-field- Form field wrappert-icon- Icon component (MDI)t-input- Text inputt-loading- Loading indicatort-modal- Modal dialogt-msg- Message displayt-notification- Notification toastt-pagination- Pagination controlst-radio- Radio buttont-search-bar- Search bart-select- Select dropdownt-slider- Slider inputt-switch- Toggle switcht-table- Data tablet-tabs- Tab navigationt-tag- Tag/badget-taginput- Tag inputt-textarea- Textarea inputt-theme-toggle- Light/dark theme togglet-tooltip- Tooltip
Available Vue composables:
useApiEndpoint- API endpoint configurationuseAuthHeaders- Authentication headersuseBasemapLayers- MapLibre basemap layersuseDownload- File download utilitiesuseLogin/useLogout- Authentication actionsuseLoginGate- Login gate managementuseMixpanel- Mixpanel analyticsuseRouteCategories- Transit route categoriesuseRouteResolver- Route resolutionuseToastNotification- Toast notificationsuseUser- Current user state
# Install dependencies
yarn install
# Start development server with playground
yarn dev
# Run linting
yarn lint
# Run tests
yarn test
# Type check
yarn test:types
# Build the module
yarn prepack- Nuxt 4.2.0
- Vue 3.5.22
- Node.js (see
.nvmrcif available)
Dual licensed:
- GPLv3 for open-source use
- Commercial license available from Interline
See LICENSE.md for full details.
Copyright © Interline Technologies LLC