BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/lomi-ui/price-selector
This component no longer exists. It was in lomi-ui’s manifest when we first indexed it and is not there now — the registry served its inventory on 2026-08-05 and this item was not on it. The install command below will fail. It is kept here because a tutorial somewhere still tells people to run it.

Price selector

lomi-ui/price-selector
RemovedBlock

Hosted checkout billing cycle selector for the dark product panel.

Install it

npx shadcn@latest add https://raw.githubusercontent.com/lomiafrica/lomi./main/apps/docs/public/r/price-selector.json

Source

components/lomi-ui/price-selector.tsxraw.githubusercontent.com/lomiafrica/lomi./main/apps/docs/public/r/price-selector.json
1'use client';
2
3import * as React from 'react';
4
5export interface PriceOption {
6 price_id: string;
7 amount: number;
8 billing_interval?: string | null;
9 is_active?: boolean;
10 is_default?: boolean;
11}
12
13export interface PriceSelectorProps {
14 prices: PriceOption[];
15 selectedPriceId: string | null;
16 onPriceSelect: (priceId: string) => void;
17 currencyCode?: string;
18 embedded?: boolean;
19 /** Matches checkout.billing_cycle.choose_plan */
20 label?: string;
21 /** Matches checkout.billing_cycle.save */
22 saveLabel?: string;
23 className?: string;
24}
25
26const INTERVAL_LABELS: Record<string, string> = {
27 day: 'day',
28 week: 'week',
29 'bi-weekly': 'bi-weekly',
30 month: 'month',
31 monthly: 'month',
32 'bi-monthly': 'bi-monthly',
33 quarterly: 'quarter',
34 'semi-annual': 'semi-annual',
35 year: 'year',
36 yearly: 'year',
37 lifetime: 'lifetime',
38 unit: 'unit',
39};
40
41function cn(...classes: Array<string | false | null | undefined>) {
42 return classes.filter(Boolean).join(' ');
43}
44
45function formatCurrency(amount: number, currency: string) {
46 const locale = currency === 'XOF' ? 'fr-FR' : undefined;
47 const formattedAmount = amount.toLocaleString(locale, {
48 minimumFractionDigits: currency === 'USD' ? 2 : 0,
49 maximumFractionDigits: currency === 'USD' ? 2 : 0,
50 });
51 const displayCurrency = currency === 'XOF' ? 'F CFA' : currency;
52 return `${formattedAmount} ${displayCurrency}`;
53}
54
55function formatBillingIntervalLabel(interval: string | null | undefined) {
56 if (!interval) return 'month';
57 return INTERVAL_LABELS[interval] ?? interval;
58}
59
60export function PriceSelector({
61 prices,
62 selectedPriceId,
63 onPriceSelect,
64 currencyCode = 'XOF',
65 embedded = false,
66 label = 'Choose your billing cycle',
67 saveLabel = 'Save',
68 className,
69}: PriceSelectorProps) {
70 const activePrices = prices.filter((price) => price.is_active !== false);
71
72 if (activePrices.length <= 1) {
73 return null;
74 }
75
76 const defaultPrice = activePrices.find((price) => price.is_default);
77 const monthlyPrice = activePrices.find(
78 (price) =>
79 price.billing_interval === 'month' ||
80 price.billing_interval === 'monthly',
81 );
82
83 const calculateSavings = (price: PriceOption) => {
84 if (defaultPrice && defaultPrice.price_id !== price.price_id) {
85 const savingsPercent = Math.round(
86 ((defaultPrice.amount - price.amount) / defaultPrice.amount) * 100,
87 );
88 const savingsAmount = defaultPrice.amount - price.amount;
89
90 if (savingsPercent > 0) {
91// … truncated

Facts

Registry
lomi-ui
Type
registry:block
Access
Free
Files written
0
Licence
NOASSERTION
In the index
at or before 2026-08-01
Last confirmed
14 days ago

Go to the source

lomi.africa lomiafrica/lomi. on GitHub Raw registry item This item as JSON

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

ToolDrift

What the AI coding tools changed last night

tooldrift.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and ToolDrift

part of Toolproof, the measurement layer for AI agent tooling

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex