Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Ship professional landing pages in hours, not weeks. While other libraries offer

Following the shadcn/ui philosophy, copy components directly into your project for full control and customization.

**Visit [lantern.dev/ui](https://lantern.dev/ui)** to browse components, view live previews, and copy source code with one click.
**Visit [lanternui.com](https://lanternui.com)** to browse components, view live previews, and copy source code with one click.

## Prerequisites

Expand Down Expand Up @@ -40,7 +40,7 @@ Configure Lantern UI as a namespaced registry in your `components.json`:
```json
{
"registries": {
"@lantern": "https://lantern.dev/r/{name}.json"
"@lantern": "https://lanternui.com/r/{name}.json"
}
}
```
Expand All @@ -59,7 +59,7 @@ The CLI will automatically resolve all Lantern UI dependencies (e.g., `@lantern/

### Option 2: Manual Installation

Browse and copy component source code directly from [lantern.dev/ui](https://lantern.dev/ui) into your project for full control and customization.
Browse and copy component source code directly from [lanternui.com](https://lanternui.com) into your project for full control and customization.

## Using Lantern UI for Marketing Pages

Expand Down Expand Up @@ -283,6 +283,10 @@ Want to contribute? Check out our [Contributing Guide](./CONTRIBUTING.md) for de

## Roadmap

- Add Blog tab
- Add "Introducing Lantern UI Components"
- Add "Introducing Lantern UI Palettes"
- Add "Best Practices for Using Lantern UI"
- Add Docs tab -- this should explain how to get started
- Additional sections: Features (Bullets), News Articles, Case Studies, Team, Navbar, Changelog

Expand Down
29 changes: 21 additions & 8 deletions components/app-layout/library-search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import * as React from "react";
import { useRouter } from "next/navigation";
import { SearchBar, type SearchResult } from "@/components/ui/search-bar";
import { navigationData } from "@/data";
import { getComponentTitle } from "@/lib/component-titles";
import { cn } from "@/lib/utils";

interface LibrarySearchProps {
Expand All @@ -29,10 +30,7 @@ export function LibrarySearch({ className }: LibrarySearchProps) {
// Add items from main items array
if (category.items) {
category.items.forEach((item) => {
const title = item.id
.split("-")
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(" ");
const title = getComponentTitle(item.id);

if (
title.toLowerCase().includes(lowerQuery) ||
Expand All @@ -53,12 +51,27 @@ export function LibrarySearch({ className }: LibrarySearchProps) {
// Add items from subcategories
if (category.subcategories) {
category.subcategories.forEach((subcategory) => {
// Add the subcategory itself as a result
const subcategorySlug = subcategory.title
.toLowerCase()
.replace(/\s+/g, "-");

if (
subcategory.title.toLowerCase().includes(lowerQuery) ||
category.title.toLowerCase().includes(lowerQuery)
) {
results.push({
id: `subcategory:${category.title.toLowerCase()}:${subcategorySlug}`,
title: subcategory.title,
category: category.title,
href: `/${category.title.toLowerCase()}/${subcategorySlug}`,
icon: categoryIcon,
});
}

if (subcategory.items) {
subcategory.items.forEach((item) => {
const title = item.id
.split("-")
.map((word) => word.charAt(0).toUpperCase() + word.slice(1))
.join(" ");
const title = getComponentTitle(item.id);

if (
title.toLowerCase().includes(lowerQuery) ||
Expand Down
2 changes: 1 addition & 1 deletion components/preview/component-page-client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ export function ComponentPageClient({

<TabsContent value="cli" className="mt-0">
<CodeBlock
code={`pnpm dlx shadcn@latest add http://lantern.dev/r/${component}.json`}
code={`pnpm dlx shadcn@latest add http://lanternui.com/r/${component}.json`}
lang="bash"
/>
</TabsContent>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Copy-paste React components for modern B2B SaaS landing pages, following the shadcn/ui philosophy",
"license": "MIT",
"author": "Lantern Team",
"homepage": "https://lantern.dev/ui",
"homepage": "https://lanternui.com",
"repository": {
"type": "git",
"url": "https://github.com/lanterndata/lantern-ui.git"
Expand Down
2 changes: 1 addition & 1 deletion scripts/generate-registry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ const items: RegistryItem[] = source.components.map(
const registry = {
$schema: "https://ui.shadcn.com/schema/registry.json",
name: "lantern",
homepage: "https://ui.lantern.dev",
homepage: "https://lanternui.com",
items: items,
};

Expand Down