Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Navigation bar using ReactPy and Bootstrap 5.2 #1124

fsmosca started this conversation in Share
Discussion options

A navbar demo, the source code is in my github repository.

Big screen

image

Small screen.

image

You must be logged in to vote

Replies: 1 comment 2 replies

Comment options

Development notes

I use fastapi backend.

navbar.py

from reactpy import component, html
from reactpy.backend.fastapi import configure, Options
from reactpy_router import route, simple
from fastapi import FastAPI
HEADER_TITLE = 'ReactPy-Navbar'
...
app = FastAPI()
configure(app, root, options=Options(head=html.head(html.title(HEADER_TITLE))))

and normally just use the following requirements.txt content.

reactpy
reactpy-router

and run the app with

uvicorn navbar:app --reload

That requirements.txt has an issue though, it cannot see reactpy_router.

The solution is to use

reactpy[fastpapi]

in the requirements.txt

I am on windows 10 OS,

You must be logged in to vote
2 replies
Comment options

It would be really cool to have some of this released as a reactpy-bootstrap package!

Comment options

Not this time. But I will.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Share
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /