• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
dcm31

dcm31

buildDotMoi

Unlisted
Like
buildDotMoi
Home
Code
6
backend
1
examples
1
frontend
4
README-custom-tabs-swipe.md
README.md
moi.md
Branches
19
Pull requests
4
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README-custom-tabs-swipe.md
Code
/
README-custom-tabs-swipe.md
Search
6/9/2025
README-custom-tabs-swipe.md

Custom Tabs Swipe View Feature

This branch implements the feature to make custom tabs behave like the "Posts" tab, allowing vals in custom tabs to be viewed in the swipe viewer.

Changes Made

  1. ValGrid Component:

    • Updated to support swipe viewer for both "Posts" tab and any custom tabs
    • Added logic to only exclude "code" tab from swipe viewer functionality
  2. ValGridItem Component:

    • Modified to handle link URLs differently based on tab types
    • Added special handling for code tab items to always link directly to Val Town
    • Improved UI indicators to show when swipe view is available
  3. Project Refactoring:

    • Created a new ProfileTabs.tsx component to extract tab navigation and content functionality
    • Split UserProfile.tsx code into smaller, more maintainable components
    • Added proper tab switching functionality within components

How It Works

Custom tabs now have the same behavior as the "Posts" tab:

  • When clicking on a val in a custom tab, if it has a proper URL (from moiConfig or httpEndpoint), it will open in the swipe viewer
  • Users can swipe through all vals in that custom tab
  • This maintains the existing behavior of the "code" tab, which still links directly to Val Town

Testing Notes

  • Verify that custom tabs show the swipe viewer when clicking on vals
  • Confirm that swipe navigation works within custom tabs
  • Check that the "code" tab still links directly to Val Town pages
  • Test that "View All Code" button works correctly when a custom tab has no content
FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.