instruction
stringlengths
0
1k
input
stringlengths
1
1k
output
stringlengths
10
6.51k
"""UI and logic inkeep chat component.""" import reflex as rx
from reflex.vars import Var class InkeepSearchBar(rx.NoSSRComponent): tag = "InkeepSearchBar" library = "@inkeep/cxkit-react@0.5.55" class Search(rx.el.Div): def add_imports(self): """Add the imports for the component.""" return { "react": {ImportVar(tag="useContext")}, ...
from reflex.utils.imports import ImportVar
"""UI and logic inkeep chat component.""" import reflex as rx from reflex.utils.imports import ImportVar
class InkeepSearchBar(rx.NoSSRComponent): tag = "InkeepSearchBar" library = "@inkeep/cxkit-react@0.5.55" class Search(rx.el.Div): def add_imports(self): """Add the imports for the component.""" return { "react": {ImportVar(tag="useContext")}, "$/utils/context": {...
from reflex.vars import Var
"""UI and logic inkeep chat component.""" import reflex as rx from reflex.utils.imports import ImportVar from reflex.vars import Var
class Search(rx.el.Div): def add_imports(self): """Add the imports for the component.""" return { "react": {ImportVar(tag="useContext")}, "$/utils/context": {ImportVar(tag="ColorModeContext")}, } def add_hooks(self): """Add the hooks for the component....
class InkeepSearchBar(rx.NoSSRComponent): tag = "InkeepSearchBar" library = "@inkeep/cxkit-react@0.5.55"
"""UI and logic inkeep chat component.""" import reflex as rx from reflex.utils.imports import ImportVar from reflex.vars import Var class InkeepSearchBar(rx.NoSSRComponent):
library = "@inkeep/cxkit-react@0.5.55" class Search(rx.el.Div): def add_imports(self): """Add the imports for the component.""" return { "react": {ImportVar(tag="useContext")}, "$/utils/context": {ImportVar(tag="ColorModeContext")}, } def add_hooks(self): ...
tag = "InkeepSearchBar"
"""UI and logic inkeep chat component.""" import reflex as rx from reflex.utils.imports import ImportVar from reflex.vars import Var class InkeepSearchBar(rx.NoSSRComponent): tag = "InkeepSearchBar"
class Search(rx.el.Div): def add_imports(self): """Add the imports for the component.""" return { "react": {ImportVar(tag="useContext")}, "$/utils/context": {ImportVar(tag="ColorModeContext")}, } def add_hooks(self): """Add the hooks for the component....
library = "@inkeep/cxkit-react@0.5.55"
"""UI and logic inkeep chat component.""" import reflex as rx from reflex.utils.imports import ImportVar from reflex.vars import Var class InkeepSearchBar(rx.NoSSRComponent): tag = "InkeepSearchBar" library = "@inkeep/cxkit-react@0.5.55" class Search(rx.el.Div):
def add_hooks(self): """Add the hooks for the component.""" return [ "const { resolvedColorMode } = useContext(ColorModeContext)", """ const escalationParams = { type: "object", properties: { explanation: { type: "string", description: "A brief few word ...
def add_imports(self): """Add the imports for the component.""" return { "react": {ImportVar(tag="useContext")}, "$/utils/context": {ImportVar(tag="ColorModeContext")}, }
placeholder: 'Search', }, aiChatSettings: { // optional typeof InkeepAIChatSettings exampleQuestions: [ 'How does Reflex work?', 'What types of apps can I build with Reflex?', 'Where can I deploy my apps?', ], getTools: () => [ { type: "function", function: { ...
inkeep = Search.create
def create(cls): """Create the search component.""" return super().create( InkeepSearchBar.create( special_props=[Var("{...searchBarProps}")], ) )
I deploy my apps?', ], getTools: () => [ { type: "function", function: { name: "provideAnswerConfidence", description: "Determine how confident the AI assistant was and whether or not to escalate to humans.", parameters: escalationParams, }, r...
inkeep = Search.create
"""UI and logic for the navbar component."""
import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.paths import blog_data from pcweb.pages.docs import ai_builder, ge...
import reflex as rx
"""UI and logic for the navbar component.""" import reflex as rx
from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.paths import blog_data from pcweb.pages.docs import ai_builder, getting_started from pcwe...
import reflex_ui as ui
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui
from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.paths import blog_data from pcweb.pages.docs import ai_builder, getting_started from pcweb.pages.faq import faq from pcweb.pages.framework....
from reflex_ui.blocks.lemcal import lemcal_dialog
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog
from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.paths import blog_data from pcweb.pages.docs import ai_builder, getting_started from pcweb.pages.faq import faq from pcweb.pages.framework.framework import framework from pcweb.pages.hosting.hosting ...
from pcweb.components.hosting_banner import hosting_banner
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner
from pcweb.pages.blog import blogs from pcweb.pages.blog.paths import blog_data from pcweb.pages.docs import ai_builder, getting_started from pcweb.pages.faq import faq from pcweb.pages.framework.framework import framework from pcweb.pages.hosting.hosting import hosting_landing from pcweb.pages.use_cases.use_cases imp...
from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL
from pcweb.pages.blog.paths import blog_data from pcweb.pages.docs import ai_builder, getting_started from pcweb.pages.faq import faq from pcweb.pages.framework.framework import framework from pcweb.pages.hosting.hosting import hosting_landing from pcweb.pages.use_cases.use_cases import use_cases_page from ...link_bu...
from pcweb.pages.blog import blogs
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs
from pcweb.pages.docs import ai_builder, getting_started from pcweb.pages.faq import faq from pcweb.pages.framework.framework import framework from pcweb.pages.hosting.hosting import hosting_landing from pcweb.pages.use_cases.use_cases import use_cases_page from ...link_button import resources_button from ..sidebar i...
from pcweb.pages.blog.paths import blog_data
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from pcweb.pages.faq import faq from pcweb.pages.framework.framework import framework from pcweb.pages.hosting.hosting import hosting_landing from pcweb.pages.use_cases.use_cases import use_cases_page from ...link_button import resources_button from ..sidebar import SidebarState from .buttons.discord import discord f...
from pcweb.pages.docs import ai_builder, getting_started
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from pcweb.pages.framework.framework import framework from pcweb.pages.hosting.hosting import hosting_landing from pcweb.pages.use_cases.use_cases import use_cases_page from ...link_button import resources_button from ..sidebar import SidebarState from .buttons.discord import discord from .buttons.github import githu...
from pcweb.pages.faq import faq
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from pcweb.pages.hosting.hosting import hosting_landing from pcweb.pages.use_cases.use_cases import use_cases_page from ...link_button import resources_button from ..sidebar import SidebarState from .buttons.discord import discord from .buttons.github import github from .buttons.sidebar import navbar_sidebar_button f...
from pcweb.pages.framework.framework import framework
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from pcweb.pages.use_cases.use_cases import use_cases_page from ...link_button import resources_button from ..sidebar import SidebarState from .buttons.discord import discord from .buttons.github import github from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: ...
from pcweb.pages.hosting.hosting import hosting_landing
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from ...link_button import resources_button from ..sidebar import SidebarState from .buttons.discord import discord from .buttons.github import github from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( ...
from pcweb.pages.use_cases.use_cases import use_cases_page
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from ..sidebar import SidebarState from .buttons.discord import discord from .buttons.github import github from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16,...
from ...link_button import resources_button
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from .buttons.discord import discord from .buttons.github import github from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-sla...
from ..sidebar import SidebarState
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from .buttons.github import github from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( ...
from .buttons.discord import discord
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, class...
from .buttons.github import github
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, class_name="font-small text-slate-9 truncate text-start ...
from .buttons.sidebar import navbar_sidebar_button
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, class_name="font-small text-slate-9 truncate text-start w-[150px]", ), ...
from .search import search_bar
"""UI and logic for the navbar component.""" import reflex as rx import reflex_ui as ui from reflex_ui.blocks.lemcal import lemcal_dialog from pcweb.components.hosting_banner import hosting_banner from pcweb.constants import REFLEX_BUILD_URL, REFLEX_CLOUD_URL from pcweb.pages.blog import blogs from pcweb.pages.blog.p...
def link_item(name: str, url: str, active_str: str = ""): router_path = rx.State.router.page.path url = url.rstrip("/") + "/" if active_str == "/": is_home = router_path == "/" is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.conta...
def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, class_name="font-small text-slate-9 truncate text-start w-[150px]", ), ...
n from ..sidebar import SidebarState from .buttons.discord import discord from .buttons.github import github from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16...
def blog_section_item(date: str, title: str, url: str) -> rx.Component: return rx.link( rx.box( rx.moment( date, format="MMM DD, YYYY", class_name="font-medium font-size-[0.8125rem] text-slate-9 truncate leading-[1.25rem] tracking-[-0.01013rem]"...
def link_item(name: str, url: str, active_str: str = ""): router_path = rx.State.router.page.path url = url.rstrip("/") + "/" if active_str == "/": is_home = router_path == "/" is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.contains...
ort discord from .buttons.github import github from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.tex...
url = url.rstrip("/") + "/" if active_str == "/": is_home = router_path == "/" is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( ...
router_path = rx.State.router.page.path
b from .buttons.sidebar import navbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, clas...
if active_str == "/": is_home = router_path == "/" is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( is_home, True, rx.con...
url = url.rstrip("/") + "/"
vbar_sidebar_button from .search import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, class_name="font-small text-slate-9 t...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, ...
if active_str == "/": is_home = router_path == "/" is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( is_home, True, rx.cond(is_d...
ch import search_bar def resource_item(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, class_name="font-small text-slate-9 truncate text-start w-[150px]",...
is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) ) ...
is_home = router_path == "/"
tem(text: str, url: str, icon: str, index): return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, class_name="font-small text-slate-9 truncate text-start w-[150px]", ), rx.icon( ...
not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) ) elif active_str == "builder": activ...
is_docs = router_path.contains("docs")
return rx.el.a( rx.box( ui.icon(icon, size=16, class_name="flex-shrink-0 text-slate-9"), rx.text( text, class_name="font-small text-slate-9 truncate text-start w-[150px]", ), rx.icon( tag="chevron_right", ...
not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) ) elif active_str == "builder": active = router_path.contains("ai-builder") elif active_str == "hosting" or active_str ...
not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting"))
rink-0 text-slate-9"), rx.text( text, class_name="font-small text-slate-9 truncate text-start w-[150px]", ), rx.icon( tag="chevron_right", size=14, stroke_width=2, class_name="flex-shrink-...
active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) ) elif active_str == "builder": active = router_path.contains("ai-builder") elif active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | ...
not_ai_builder = ~router_path.contains("ai-builder")
xt, class_name="font-small text-slate-9 truncate text-start w-[150px]", ), rx.icon( tag="chevron_right", size=14, stroke_width=2, class_name="flex-shrink-0 text-slate-8 ml-auto", ), class_name...
elif active_str == "builder": active = router_path.contains("ai-builder") elif active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains("hosting") elif active_str == "pricing": active = router_path.contains("pricing") el...
active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) )
con( tag="chevron_right", size=14, stroke_width=2, class_name="flex-shrink-0 text-slate-8 ml-auto", ), class_name="flex flex-row flex-nowrap items-center gap-4 hover:bg-secondary-3 px-[1.125rem] py-2 rounded-md w-full transition-col...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, ...
elif active_str == "builder": active = router_path.contains("ai-builder") elif active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains("hosting") elif active_str == "pricing": active = router_path.contains("pricing") elif act...
t", size=14, stroke_width=2, class_name="flex-shrink-0 text-slate-8 ml-auto", ), class_name="flex flex-row flex-nowrap items-center gap-4 hover:bg-secondary-3 px-[1.125rem] py-2 rounded-md w-full transition-colors", ), class_name="w...
elif active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains("hosting") elif active_str == "pricing": active = router_path.contains("pricing") elif active_str == "framework": # Check if path contains "docs" but excludes ai-b...
active = router_path.contains("ai-builder")
ke_width=2, class_name="flex-shrink-0 text-slate-8 ml-auto", ), class_name="flex flex-row flex-nowrap items-center gap-4 hover:bg-secondary-3 px-[1.125rem] py-2 rounded-md w-full transition-colors", ), class_name="w-full text-slate-9 hover:text-slate-9", t...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, ...
elif active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains("hosting") elif active_str == "pricing": active = router_path.contains("pricing") elif active_str == "framework": # Check if path contains "docs" but excludes ai-builder...
e-8 ml-auto", ), class_name="flex flex-row flex-nowrap items-center gap-4 hover:bg-secondary-3 px-[1.125rem] py-2 rounded-md w-full transition-colors", ), class_name="w-full text-slate-9 hover:text-slate-9", to=url, on_click=SidebarState.set_sidebar_index(index), ...
elif active_str == "pricing": active = router_path.contains("pricing") elif active_str == "framework": # Check if path contains "docs" but excludes ai-builder, cloud, and hosting # OR if path contains "open-source" (for the main open source landing page) is_docs = router_path....
active = router_path.contains("cloud") | router_path.contains("hosting")
items-center gap-4 hover:bg-secondary-3 px-[1.125rem] py-2 rounded-md w-full transition-colors", ), class_name="w-full text-slate-9 hover:text-slate-9", to=url, on_click=SidebarState.set_sidebar_index(index), ) def link_item(name: str, url: str, active_str: str = ""): router_p...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, ...
elif active_str == "pricing": active = router_path.contains("pricing") elif active_str == "framework": # Check if path contains "docs" but excludes ai-builder, cloud, and hosting # OR if path contains "open-source" (for the main open source landing page) is_docs = router_path.contai...
-3 px-[1.125rem] py-2 rounded-md w-full transition-colors", ), class_name="w-full text-slate-9 hover:text-slate-9", to=url, on_click=SidebarState.set_sidebar_index(index), ) def link_item(name: str, url: str, active_str: str = ""): router_path = rx.State.router.page.path u...
elif active_str == "framework": # Check if path contains "docs" but excludes ai-builder, cloud, and hosting # OR if path contains "open-source" (for the main open source landing page) is_docs = router_path.contains("docs") is_open_source_page = router_path.contains("open-source") ...
active = router_path.contains("pricing")
tion-colors", ), class_name="w-full text-slate-9 hover:text-slate-9", to=url, on_click=SidebarState.set_sidebar_index(index), ) def link_item(name: str, url: str, active_str: str = ""): router_path = rx.State.router.page.path url = url.rstrip("/") + "/" if active_str ...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, ...
elif active_str == "framework": # Check if path contains "docs" but excludes ai-builder, cloud, and hosting # OR if path contains "open-source" (for the main open source landing page) is_docs = router_path.contains("docs") is_open_source_page = router_path.contains("open-source") ...
str: str = ""): router_path = rx.State.router.page.path url = url.rstrip("/") + "/" if active_str == "/": is_home = router_path == "/" is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~rou...
is_open_source_page = router_path.contains("open-source") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = (is_docs & not_cloud & not_ai_builder) | is_open_source_page elif active_str == "do...
is_docs = router_path.contains("docs")
er.page.path url = url.rstrip("/") + "/" if active_str == "/": is_home = router_path == "/" is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active...
not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = (is_docs & not_cloud & not_ai_builder) | is_open_source_page elif active_str == "docs": active = rx.cond( router_path.contains("l...
is_open_source_page = router_path.contains("open-source")
= "/": is_home = router_path == "/" is_docs = router_path.contains("docs") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud...
not_ai_builder = ~router_path.contains("ai-builder") active = (is_docs & not_cloud & not_ai_builder) | is_open_source_page elif active_str == "docs": active = rx.cond( router_path.contains("library"), False, router_path.contains("docs") ) elif active_str: ac...
not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting"))
s") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) ) elif active_str == "builder": ac...
active = (is_docs & not_cloud & not_ai_builder) | is_open_source_page elif active_str == "docs": active = rx.cond( router_path.contains("library"), False, router_path.contains("docs") ) elif active_str: active = router_path.contains(active_str) else: act...
not_ai_builder = ~router_path.contains("ai-builder")
ter_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) ) elif active_str == "builder": active = router_path.contains("ai-builder") elif active_st...
elif active_str == "docs": active = rx.cond( router_path.contains("library"), False, router_path.contains("docs") ) elif active_str: active = router_path.contains(active_str) else: active = False common_cn = "transition-color p-[1.406rem_0px] font-small xl:...
active = (is_docs & not_cloud & not_ai_builder) | is_open_source_page
s("ai-builder") active = rx.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) ) elif active_str == "builder": active = router_path.contains("ai-builder") elif active_str == "hosting" or active_str == "cloud": active = router_path.conta...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, ...
elif active_str == "docs": active = rx.cond( router_path.contains("library"), False, router_path.contains("docs") ) elif active_str: active = router_path.contains(active_str) else: active = False
x.cond( is_home, True, rx.cond(is_docs & not_cloud & not_ai_builder, True, False) ) elif active_str == "builder": active = router_path.contains("ai-builder") elif active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains...
elif active_str: active = router_path.contains(active_str) else: active = False common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:...
active = rx.cond( router_path.contains("library"), False, router_path.contains("docs") )
active_str == "builder": active = router_path.contains("ai-builder") elif active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains("hosting") elif active_str == "pricing": active = router_path.contains("pricing") elif active_...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, ...
elif active_str: active = router_path.contains(active_str) else: active = False
active = router_path.contains("ai-builder") elif active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains("hosting") elif active_str == "pricing": active = router_path.contains("pricing") elif active_str == "framework": ...
else: active = False common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" r...
active = router_path.contains(active_str)
if active_str == "hosting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains("hosting") elif active_str == "pricing": active = router_path.contains("pricing") elif active_str == "framework": # Check if path contains "docs" but excludes ai-builder, ...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 " active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, ...
active = False
sting" or active_str == "cloud": active = router_path.contains("cloud") | router_path.contains("hosting") elif active_str == "pricing": active = router_path.contains("pricing") elif active_str == "framework": # Check if path contains "docs" but excludes ai-builder, cloud, and hosting ...
active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9" unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, to=url, class_name=common_cn + rx.cond(active, active_cn, unactive_cn), on_click=SidebarState.set_sidebar_index(...
common_cn = "transition-color p-[1.406rem_0px] font-small xl:flex hidden items-center justify-center hover:text-secondary-12 "
str == "pricing": active = router_path.contains("pricing") elif active_str == "framework": # Check if path contains "docs" but excludes ai-builder, cloud, and hosting # OR if path contains "open-source" (for the main open source landing page) is_docs = router_path.contains("docs") ...
unactive_cn = "shadow-none text-secondary-11" return rx.el.a( name, to=url, class_name=common_cn + rx.cond(active, active_cn, unactive_cn), on_click=SidebarState.set_sidebar_index(0), ) def blog_section_item(date: str, title: str, url: str) -> rx.Component: return rx....
active_cn = "shadow-[inset_0_-0.5px_0_0_var(--c-violet-9)] text-violet-9 hover:text-violet-9"
ork": # Check if path contains "docs" but excludes ai-builder, cloud, and hosting # OR if path contains "open-source" (for the main open source landing page) is_docs = router_path.contains("docs") is_open_source_page = router_path.contains("open-source") not_cloud = ~(router_path...
return rx.el.a( name, to=url, class_name=common_cn + rx.cond(active, active_cn, unactive_cn), on_click=SidebarState.set_sidebar_index(0), ) def blog_section_item(date: str, title: str, url: str) -> rx.Component: return rx.link( rx.box( rx.moment( ...
unactive_cn = "shadow-none text-secondary-11"
is_open_source_page = router_path.contains("open-source") not_cloud = ~(router_path.contains("cloud") | router_path.contains("hosting")) not_ai_builder = ~router_path.contains("ai-builder") active = (is_docs & not_cloud & not_ai_builder) | is_open_source_page elif active_str == "docs": ...
def blog_section() -> rx.Component: return ui.navigation_menu.content( rx.box( rx.link( rx.moment( str(next(iter(blog_data.values())).metadata["date"]), format="MMM DD, YYYY", class_name="z-[2] pt-[0.875rem] pl-[1.125...
def blog_section_item(date: str, title: str, url: str) -> rx.Component: return rx.link( rx.box( rx.moment( date, format="MMM DD, YYYY", class_name="font-medium font-size-[0.8125rem] text-slate-9 truncate leading-[1.25rem] tracking-[-0.01013rem]", ...
w justify-between gap-3 hover:bg-slate-3 px-[1.125rem] py-3 rounded-md w-full text-nowrap transition-bg self-stretch", ), class_name="w-full", underline="none", href=blogs.path, ), blog_section_item( ...
def grid_card( title: str, description: str, url: str, image: str, image_style: str ) -> rx.Component: return rx.el.a( rx.box( rx.text(title, class_name="text-slate-12 text-base font-semibold"), rx.el.button( rx.icon("chevron-right", class_name="text-slate-9 si...
def link_button(label: str, url: str) -> rx.Component: return rx.el.a( resources_button( label, size="md", variant="transparent", class_name="justify-start w-full" ), to=url, target="_blank", underline="none", class_name="!w-full", )
n_item( date=str(list(blog_data.values())[1].metadata["date"]), title=list(blog_data.values())[1].metadata["title"], url="/" + list(blog_data.keys())[1].replace("/docs/", ""), ), blog_section_item( date=str(l...
def grid_card_unique(title: str, description: str, url: str, component) -> rx.Component: return rx.link( rx.box( rx.text(title, class_name="text-slate-12 text-base font-semibold"), rx.el.button( rx.icon("chevron-right", class_name="text-slate-9 size-4"), ...
def grid_card( title: str, description: str, url: str, image: str, image_style: str ) -> rx.Component: return rx.el.a( rx.box( rx.text(title, class_name="text-slate-12 text-base font-semibold"), rx.el.button( rx.icon("chevron-right", class_name="text-slate-9 size-...
target="_blank", underline="none", class_name="!w-full", ) def grid_card( title: str, description: str, url: str, image: str, image_style: str ) -> rx.Component: return rx.el.a( rx.box( rx.text(title, class_name="text-slate-12 text-base font-semibold"), r...
# def new_resource_section(): _company_items = [ { "label": "Newsletter", "url": "https://reflex.dev/open-source/#newsletter", "icon": "MailAtSign01Icon", }, {"label": "Blog", "url": "/blog", "icon": "RightToLeftListDashIcon"}, {"label": "Affili...
def grid_card_unique(title: str, description: str, url: str, component) -> rx.Component: return rx.link( rx.box( rx.text(title, class_name="text-slate-12 text-base font-semibold"), rx.el.button( rx.icon("chevron-right", class_name="text-slate-9 size-4"), ...
x flex-col gap-3 p-5 relative border-solid !h-[16.5625rem] overflow-hidden group", ) def grid_card_unique(title: str, description: str, url: str, component) -> rx.Component: return rx.link( rx.box( rx.text(title, class_name="text-slate-12 text-base font-semibold"), rx.el.button...
_open_source_items = [ {"label": "Templates", "url": "/templates", "icon": "SidebarTopIcon"}, { "label": "Changelog", "url": "https://github.com/reflex-dev/reflex/releases", "icon": "Clock02Icon", }, { "label": "Contributing", ...
_company_items = [ { "label": "Newsletter", "url": "https://reflex.dev/open-source/#newsletter", "icon": "MailAtSign01Icon", }, {"label": "Blog", "url": "/blog", "icon": "RightToLeftListDashIcon"}, {"label": "Affiliates", "url": "/affiliates", "icon": ...
group-hover:bg-slate-3 transition-bg rounded-md flex items-center justify-center", ), class_name="flex flex-row items-center gap-2 justify-between", ), rx.text(description, class_name="text-slate-9 text-sm font-medium"), component, href=url, is_external=T...
def _link_button(label: str, url: str, icon: str) -> rx.Component: return rx.el.a( resources_button( ui.icon(icon, size=16, class_name="flex-shrink-0"), label, size="md", variant="transparent", class_name="justify-...
_open_source_items = [ {"label": "Templates", "url": "/templates", "icon": "SidebarTopIcon"}, { "label": "Changelog", "url": "https://github.com/reflex-dev/reflex/releases", "icon": "Clock02Icon", }, { "label": "Contributing", "...
con", }, {"label": "Blog", "url": "/blog", "icon": "RightToLeftListDashIcon"}, {"label": "Affiliates", "url": "/affiliates", "icon": "AddTeamIcon"}, {"label": "Use Cases", "url": use_cases_page.path, "icon": "CheckListIcon"}, ] _open_source_items = [ {"label": "Templates...
def _resource_section_column( section_title: str, resource_item: list[dict[str, str]] ): return rx.box( rx.box( rx.text( section_title, class_name="text-sm text-slate-12 font-semibold px-2.5 py-1 pb-2", ), ...
def _link_button(label: str, url: str, icon: str) -> rx.Component: return rx.el.a( resources_button( ui.icon(icon, size=16, class_name="flex-shrink-0"), label, size="md", variant="transparent", class_name="justify-start ...
": "https://github.com/reflex-dev/reflex/releases", "icon": "Clock02Icon", }, { "label": "Contributing", "url": "https://github.com/reflex-dev/reflex/blob/main/CONTRIBUTING.md", "icon": "SourceCodeIcon", }, { "label": "Discussio...
return ui.navigation_menu.content( _resource_section_column("Open Source", _open_source_items), _resource_section_column("Company", _company_items), # Grid cards rx.box( grid_card( "Customers", "Meet the teams who chose Reflex.", ...
def _resource_section_column( section_title: str, resource_item: list[dict[str, str]] ): return rx.box( rx.box( rx.text( section_title, class_name="text-sm text-slate-12 font-semibold px-2.5 py-1 pb-2", ), ...
], class_name="flex flex-col w-full p-2", ), class_name="flex flex-col w-full max-w-[9.1875rem]", ) return ui.navigation_menu.content( _resource_section_column("Open Source", _open_source_items), _resource_section_column("Company", _company_item...
def logo() -> rx.Component: return rx.el.a( rx.fragment( rx.image( src="/logos/light/reflex.svg", alt="Reflex Logo", class_name="shrink-0 block dark:hidden", ), rx.image( src="/logos/dark/reflex.svg", ...
def new_menu_trigger( title: str, url: str | None = None, active_str: str = "" ) -> rx.Component: if url: return ui.navigation_menu.trigger(link_item(title, url, active_str)) return ui.navigation_menu.trigger( rx.box( rx.text( title, class_name="p-...
x flex-col w-full max-w-[9.1875rem]", ) return ui.navigation_menu.content( _resource_section_column("Open Source", _open_source_items), _resource_section_column("Company", _company_items), # Grid cards rx.box( grid_card( "Customers", ...
return ui.navigation_menu.trigger( rx.box( rx.text( title, class_name="p-[1.406rem_0px] font-medium text-sm text-secondary-11 group-hover:text-secondary-12 transition-colors", ), rx.icon( "chevron-down", cla...
if url: return ui.navigation_menu.trigger(link_item(title, url, active_str))
low-hidden p-1.5", ), ) def new_menu_trigger( title: str, url: str | None = None, active_str: str = "" ) -> rx.Component: if url: return ui.navigation_menu.trigger(link_item(title, url, active_str)) return ui.navigation_menu.trigger( rx.box( rx.text( ...
def doc_section(): from pcweb.pages.docs import hosting as hosting_page return ui.navigation_menu.content( resource_item( "AI Builder Docs", ai_builder.overview.best_practices.path, "MagicWand01Icon", 0, ), resource_item( "O...
def logo() -> rx.Component: return rx.el.a( rx.fragment( rx.image( src="/logos/light/reflex.svg", alt="Reflex Logo", class_name="shrink-0 block dark:hidden", ), rx.image( src="/logos/dark/reflex.svg", ...
"chevron-down", class_name="chevron size-5 !text-secondary-11 group-hover:!text-secondary-12 py-1 mr-0 transition-all ease-out", ), class_name="flex-row items-center gap-x-1 group user-select-none cursor-pointer xl:flex hidden", on_click=rx.stop_propag...
def new_component_section() -> rx.Component: from pcweb.pages.docs import ai_builder as ai_builder_pages from pcweb.pages.docs import hosting as hosting_page return ui.navigation_menu.root( ui.navigation_menu.list( ui.navigation_menu.item( rx.box( ...
def doc_section(): from pcweb.pages.docs import hosting as hosting_page return ui.navigation_menu.content( resource_item( "AI Builder Docs", ai_builder.overview.best_practices.path, "MagicWand01Icon", 0, ), resource_item( "Open...
n-down", class_name="chevron size-5 !text-secondary-11 group-hover:!text-secondary-12 py-1 mr-0 transition-all ease-out", ), class_name="flex-row items-center gap-x-1 group user-select-none cursor-pointer xl:flex hidden", on_click=rx.stop_propagation, ), ...
return ui.navigation_menu.content( resource_item( "AI Builder Docs", ai_builder.overview.best_practices.path, "MagicWand01Icon", 0, ), resource_item( "Open Source Docs", getting_started.introduction.path, "...
from pcweb.pages.docs import hosting as hosting_page
lex.svg", alt="Reflex Logo", class_name="shrink-0 hidden dark:block", ), ), class_name="block shrink-0 mr-3", to="/", ) def doc_section(): from pcweb.pages.docs import hosting as hosting_page return ui.navigation_menu.content( re...
from pcweb.pages.docs import hosting as hosting_page return ui.navigation_menu.root( ui.navigation_menu.list( ui.navigation_menu.item( rx.box( logo(), rx.badge( "Docs", variant="surface"...
from pcweb.pages.docs import ai_builder as ai_builder_pages
ss_name="shrink-0 hidden dark:block", ), ), class_name="block shrink-0 mr-3", to="/", ) def doc_section(): from pcweb.pages.docs import hosting as hosting_page return ui.navigation_menu.content( resource_item( "AI Builder Docs", ai_build...
return ui.navigation_menu.root( ui.navigation_menu.list( ui.navigation_menu.item( rx.box( logo(), rx.badge( "Docs", variant="surface", class_name=( ...
from pcweb.pages.docs import hosting as hosting_page
"Book a Demo", size="sm", variant="primary", class_name="font-semibold whitespace-nowrap max-xl:hidden", ), ), unstyled=True, class_name="xl:flex hidden", ...
def navbar() -> rx.Component: return rx.box( hosting_banner(), rx.el.header( new_component_section(), class_name="flex flex-row items-center gap-12 bg-slate-1 shadow-[inset_0_-0.5px_0_0_var(--c-slate-3)] px-4 lg:px-6 w-screen h-[48px] lg:h-[65px]", ), class_na...
"""The state for the navbar component."""
class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True current_category = "All" @rx.event def set_sidebar_open(s...
import reflex as rx
"""The state for the navbar component.""" import reflex as rx class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True
@rx.event def set_sidebar_open(self, value: bool): self.sidebar_open = value def toggle_banner(self): self.banner = not self.banner def toggle_sidebar(self): self.sidebar_open = not self.sidebar_open def toggle_ai_chat(self): self.ai_chat = not self.ai_chat ...
current_category = "All"
"""The state for the navbar component.""" import reflex as rx class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True curr...
def toggle_sidebar(self): self.sidebar_open = not self.sidebar_open def toggle_ai_chat(self): self.ai_chat = not self.ai_chat def update_category(self, tag): self.current_category = tag
def toggle_banner(self): self.banner = not self.banner
"""The state for the navbar component.""" import reflex as rx class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True curr...
def toggle_sidebar(self): self.sidebar_open = not self.sidebar_open def toggle_ai_chat(self): self.ai_chat = not self.ai_chat def update_category(self, tag): self.current_category = tag
self.banner = not self.banner
"""The state for the navbar component.""" import reflex as rx class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True curr...
def toggle_ai_chat(self): self.ai_chat = not self.ai_chat def update_category(self, tag): self.current_category = tag
self.sidebar_open = not self.sidebar_open
"""The state for the navbar component.""" import reflex as rx class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True curr...
def update_category(self, tag): self.current_category = tag
def toggle_ai_chat(self): self.ai_chat = not self.ai_chat
"""The state for the navbar component.""" import reflex as rx class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True curr...
def update_category(self, tag): self.current_category = tag
self.ai_chat = not self.ai_chat
"""The state for the navbar component.""" import reflex as rx class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True curr...
def update_category(self, tag): self.current_category = tag
"""The state for the navbar component.""" import reflex as rx class NavbarState(rx.State): """The state for the navbar component.""" # Whether the sidebar is open. sidebar_open: bool = False search_input: str = "" enter: bool = False banner: bool = True ai_chat: bool = True curr...
self.current_category = tag
import os
import reflex_ui as ui import typesense from reflex.experimental import ClientStateVar last_copied = ClientStateVar.create("is_copied", "") suggestion_items = [ { "name": "Components Overview", "path": "/docs/library", "icon": "blocks", "description": "Discover and explore the ful...
import reflex as rx
import os import reflex as rx
import typesense from reflex.experimental import ClientStateVar last_copied = ClientStateVar.create("is_copied", "") suggestion_items = [ { "name": "Components Overview", "path": "/docs/library", "icon": "blocks", "description": "Discover and explore the full library of available ...
import reflex_ui as ui
import os import reflex as rx import reflex_ui as ui
from reflex.experimental import ClientStateVar last_copied = ClientStateVar.create("is_copied", "") suggestion_items = [ { "name": "Components Overview", "path": "/docs/library", "icon": "blocks", "description": "Discover and explore the full library of available components", ...
import typesense
import os import reflex as rx import reflex_ui as ui import typesense
last_copied = ClientStateVar.create("is_copied", "") suggestion_items = [ { "name": "Components Overview", "path": "/docs/library", "icon": "blocks", "description": "Discover and explore the full library of available components", }, { "name": "State Management", ...
from reflex.experimental import ClientStateVar
import os import reflex as rx import reflex_ui as ui import typesense from reflex.experimental import ClientStateVar
suggestion_items = [ { "name": "Components Overview", "path": "/docs/library", "icon": "blocks", "description": "Discover and explore the full library of available components", }, { "name": "State Management", "path": "/docs/state/overview", "icon": ...
last_copied = ClientStateVar.create("is_copied", "")
import os import reflex as rx import reflex_ui as ui import typesense from reflex.experimental import ClientStateVar last_copied = ClientStateVar.create("is_copied", "")
CLUSTERS = { "All Content": [], "AI Builder": ["ai_builder"], "Hosting": ["hosting"], "Components": ["custom-components", "recipes"], "Enterprise": ["enterprise"], "API Reference": ["api-reference", "api-routes"], "Docs": [ "advanced_onboarding", "assets", "authenti...
suggestion_items = [ { "name": "Components Overview", "path": "/docs/library", "icon": "blocks", "description": "Discover and explore the full library of available components", }, { "name": "State Management", "path": "/docs/state/overview", "icon": "d...
omponents Overview", "path": "/docs/library", "icon": "blocks", "description": "Discover and explore the full library of available components", }, { "name": "State Management", "path": "/docs/state/overview", "icon": "database", "description": "Master stat...
TYPESENSE_CONFIG = { "nodes": [ {"host": os.getenv("TYPESENSE_HOST"), "port": "443", "protocol": "https"} ], "api_key": os.getenv("TYPESENSE_SEARCH_API_KEY"), "connection_timeout_seconds": 2, } class SimpleSearch(rx.State): query: str selected_filter: str = "All Content" is_fetc...
CLUSTERS = { "All Content": [], "AI Builder": ["ai_builder"], "Hosting": ["hosting"], "Components": ["custom-components", "recipes"], "Enterprise": ["enterprise"], "API Reference": ["api-reference", "api-routes"], "Docs": [ "advanced_onboarding", "assets", "authentica...
erview", "icon": "palette", "description": "Customize colors, layouts, and create beautiful app designs", }, { "name": "Deployment Guide", "path": "/docs/hosting/deploy-quick-start/", "icon": "cloud", "description": "Deploy and host your application in production ...
class SimpleSearch(rx.State): query: str selected_filter: str = "All Content" is_fetching: bool = False idxed_docs_results: list[dict] = [] idxed_blogs_results: list[dict] = [] @rx.event(temporal=True) def user_query(self, value: str): self.query = value.replace("rx.", "") ...
TYPESENSE_CONFIG = { "nodes": [ {"host": os.getenv("TYPESENSE_HOST"), "port": "443", "protocol": "https"} ], "api_key": os.getenv("TYPESENSE_SEARCH_API_KEY"), "connection_timeout_seconds": 2, }
onents": ["custom-components", "recipes"], "Enterprise": ["enterprise"], "API Reference": ["api-reference", "api-routes"], "Docs": [ "advanced_onboarding", "assets", "authentication", "client_storage", "components", "database", "events", "getti...
@rx.event(temporal=True) def reset_search(self): """Reset state variables.""" self.idxed_blogs_results = [] self.idxed_docs_results = [] self.query = "" @rx.event(temporal=True) async def apply_filter_search(self, selected_filter: str): """Re-run search with ne...
def user_query(self, value: str): self.query = value.replace("rx.", "")
"Enterprise": ["enterprise"], "API Reference": ["api-reference", "api-routes"], "Docs": [ "advanced_onboarding", "assets", "authentication", "client_storage", "components", "database", "events", "getting_started", "library", "p...
@rx.event(temporal=True) def reset_search(self): """Reset state variables.""" self.idxed_blogs_results = [] self.idxed_docs_results = [] self.query = "" @rx.event(temporal=True) async def apply_filter_search(self, selected_filter: str): """Re-run search with ne...
self.query = value.replace("rx.", "")
, "api-routes"], "Docs": [ "advanced_onboarding", "assets", "authentication", "client_storage", "components", "database", "events", "getting_started", "library", "pages", "state", "state_structure", "styling", ...
@rx.event(temporal=True) async def apply_filter_search(self, selected_filter: str): """Re-run search with new filter.""" if self.selected_filter == selected_filter: return self.selected_filter = selected_filter if self.query.strip(): yield SimpleSearch...
def reset_search(self): """Reset state variables.""" self.idxed_blogs_results = [] self.idxed_docs_results = [] self.query = ""
"assets", "authentication", "client_storage", "components", "database", "events", "getting_started", "library", "pages", "state", "state_structure", "styling", "ui", "utility_methods", "vars", "wrapp...
self.idxed_docs_results = [] self.query = "" @rx.event(temporal=True) async def apply_filter_search(self, selected_filter: str): """Re-run search with new filter.""" if self.selected_filter == selected_filter: return self.selected_filter = selected_filter ...
self.idxed_blogs_results = []
"client_storage", "components", "database", "events", "getting_started", "library", "pages", "state", "state_structure", "styling", "ui", "utility_methods", "vars", "wrapping-react", ], "Blog Posts": [...
self.query = "" @rx.event(temporal=True) async def apply_filter_search(self, selected_filter: str): """Re-run search with new filter.""" if self.selected_filter == selected_filter: return self.selected_filter = selected_filter if self.query.strip(): ...
self.idxed_docs_results = []
ponents", "database", "events", "getting_started", "library", "pages", "state", "state_structure", "styling", "ui", "utility_methods", "vars", "wrapping-react", ], "Blog Posts": [], } TYPESENSE_CONFIG = { "node...
@rx.event(temporal=True) async def apply_filter_search(self, selected_filter: str): """Re-run search with new filter.""" if self.selected_filter == selected_filter: return self.selected_filter = selected_filter if self.query.strip(): yield SimpleSearch...
self.query = ""
"styling", "ui", "utility_methods", "vars", "wrapping-react", ], "Blog Posts": [], } TYPESENSE_CONFIG = { "nodes": [ {"host": os.getenv("TYPESENSE_HOST"), "port": "443", "protocol": "https"} ], "api_key": os.getenv("TYPESENSE_SEARCH_API_KEY"), "connecti...
self.selected_filter = selected_filter if self.query.strip(): yield SimpleSearch.perform_search() @rx.event(background=True, temporal=True) async def perform_search(self): """Perform Typesense search and split results.""" async with self: if not self.q...
if self.selected_filter == selected_filter: return
"wrapping-react", ], "Blog Posts": [], } TYPESENSE_CONFIG = { "nodes": [ {"host": os.getenv("TYPESENSE_HOST"), "port": "443", "protocol": "https"} ], "api_key": os.getenv("TYPESENSE_SEARCH_API_KEY"), "connection_timeout_seconds": 2, } class SimpleSearch(rx.State): query: str...
if self.query.strip(): yield SimpleSearch.perform_search() @rx.event(background=True, temporal=True) async def perform_search(self): """Perform Typesense search and split results.""" async with self: if not self.query.strip(): self.idxed_docs_re...
self.selected_filter = selected_filter
[], } TYPESENSE_CONFIG = { "nodes": [ {"host": os.getenv("TYPESENSE_HOST"), "port": "443", "protocol": "https"} ], "api_key": os.getenv("TYPESENSE_SEARCH_API_KEY"), "connection_timeout_seconds": 2, } class SimpleSearch(rx.State): query: str selected_filter: str = "All Content" is...
@rx.event(background=True, temporal=True) async def perform_search(self): """Perform Typesense search and split results.""" async with self: if not self.query.strip(): self.idxed_docs_results = [] self.idxed_blogs_results = [] return ...
if self.query.strip(): yield SimpleSearch.perform_search()
.State): query: str selected_filter: str = "All Content" is_fetching: bool = False idxed_docs_results: list[dict] = [] idxed_blogs_results: list[dict] = [] @rx.event(temporal=True) def user_query(self, value: str): self.query = value.replace("rx.", "") @rx.event(temporal=True)...
try: async with self: self.is_fetching = True yield client = typesense.Client(TYPESENSE_CONFIG) search_params = { "q": self.query, "query_by": "title,content,headings,components", "query_by_we...
if not self.query.strip(): self.idxed_docs_results = [] self.idxed_blogs_results = [] return
: str = "All Content" is_fetching: bool = False idxed_docs_results: list[dict] = [] idxed_blogs_results: list[dict] = [] @rx.event(temporal=True) def user_query(self, value: str): self.query = value.replace("rx.", "") @rx.event(temporal=True) def reset_search(self): """Res...
self.idxed_blogs_results = [] return try: async with self: self.is_fetching = True yield client = typesense.Client(TYPESENSE_CONFIG) search_params = { "q": self.query, "query_b...
self.idxed_docs_results = []