Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
7443d0f
feat: add center and add shadow prop
paanSinghCoder Feb 26, 2026
7809f71
feat: add hideOnScroll, flex props
paanSinghCoder Feb 27, 2026
8fa1c84
docs: update Navbar documentation to include Flex props and new hideO…
paanSinghCoder Feb 27, 2026
df4e7bd
refactor: remove outdated comment from NavbarRootProps interface
paanSinghCoder Feb 27, 2026
ef62db5
refactor: update Navbar demo sections for clarity and consistency
paanSinghCoder Feb 27, 2026
4f02ce1
feat: enhance DemoPreview component with customizable preview class
paanSinghCoder Feb 27, 2026
8e799ae
feat: enhance Navbar demo with shadow prop and updated styles
paanSinghCoder Feb 27, 2026
33859b9
feat: add hideOnScroll demo to Navbar documentation
paanSinghCoder Feb 27, 2026
7500a58
docs: clarify navbar hideOnScroll behavior in documentation
paanSinghCoder Feb 27, 2026
2602aca
chore: add Navbar into examples page
paanSinghCoder Feb 27, 2026
dcafa37
feat: refactor Navbar layout to use grid system and absolute center t…
paanSinghCoder Feb 27, 2026
64381d7
feat: enhance NavbarRoot component with scroll behavior improvements
paanSinghCoder Feb 27, 2026
403121c
Merge branch 'main' into feat/navbar-improvements-center
paanSinghCoder Mar 18, 2026
75cbe6b
chore: remove global class
paanSinghCoder Mar 18, 2026
17a21a2
docs: styling
paanSinghCoder Mar 18, 2026
2b1be28
refactor: simplify scroll detection code
paanSinghCoder Mar 18, 2026
155212d
feat: add scrollContainerRef prop
paanSinghCoder Mar 18, 2026
70be60b
refactor: add base-ui/utils pkg and use for merging refs
paanSinghCoder Mar 18, 2026
99b5348
refactor: remove state for tracking hidden/visible
paanSinghCoder Mar 18, 2026
e57a5c2
chore: remove shadow prop
paanSinghCoder Mar 18, 2026
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
4,741 changes: 2,357 additions & 2,384 deletions apps/www/src/app/examples/page.tsx

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions apps/www/src/components/demo/demo-preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,3 @@ export default function DemoPreview({
</LiveProvider>
);
}
{
/* // {Array.isArray(codePreview) ? ( */
}
// <Tabs
// items={codePreview.map(tab => tab.label)}
// className={styles.codeTabGroup}
// >
// {codePreview.map(tab => (
// <Tab className={styles.codeTab} value={tab.label} key={tab.label}>
// <Editor code={tab.code} />
// </Tab>
// ))}
// </Tabs>
// ) : (
// <Editor code={previewCode} />
// )}
53 changes: 52 additions & 1 deletion apps/www/src/components/demo/styles.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,46 @@
border-bottom: 0.5px solid var(--rs-color-border-base-primary);
}

.preview:has(:global(.navbar-demo-wrapper)) {
align-items: flex-start;
justify-content: flex-start;
min-height: unset;
}

/* Opt-in: top-aligned preview with dotted content area (e.g. navbar demos) */
.previewTop {
align-items: flex-start;
justify-content: flex-start;
padding: 0;
min-height: unset;
}

.previewContentTop {
padding: 0 !important;
align-items: flex-start;
justify-content: flex-start;
flex-direction: column;
}

.previewContentTop>* {
margin-bottom: var(--rs-space-8);
}

.previewContentTop::after {
content: "";
display: block;
width: calc(100% - 2 * var(--rs-space-8));
min-height: 200px;
margin: 0 var(--rs-space-8) var(--rs-space-8);
border: 2px dashed var(--rs-color-border-base-secondary);
box-sizing: border-box;
}

/* Hide dashed box for sticky demo - it has its own scrollable box inside */
.previewContentTop:has(> :global(.navbar-sticky-demo-scroll))::after {
display: none;
}

.previewReset {
position: absolute;
bottom: 8px;
Expand All @@ -48,6 +88,7 @@
flex-shrink: 0;
max-height: 400px;
}

.noShadow {
box-shadow: none;
}
Expand Down Expand Up @@ -148,13 +189,15 @@
.previewContainer {
flex-direction: column;
}

.form {
width: 100%;
max-height: 280px;
border-top: 0.5px solid var(--rs-color-border-base-primary);
border-left: none;
}
}

.playgroundDialog {
height: 88vh;
width: 72%;
Expand All @@ -165,40 +208,48 @@
display: flex;
flex-direction: column;
}

.playgroundHeader {
border: 0.5px solid var(--rs-color-border-base-primary);
background: var(--rs-color-background-base-secondary);
height: 32px;
padding: 0 var(--rs-space-5);
}

.playgroundTitle {
font-size: var(--rs-font-size-small);
font-weight: var(--rs-font-weight-medium);
line-height: var(--rs-line-height-small);
letter-spacing: var(--rs-letter-spacing-small);
}

.playgroundContent {
flex: 1;
border-radius: 0;
border: none;
}

.playgroundPreviewContainer {
flex: 2;
}

.playgroundPreview {
border-bottom: none;
padding-bottom: 1px;
}

.playgroundControls {
border-bottom: none;
max-height: none;
}

.playgroundEditor {
flex: 1;
border-top: 0.5px solid var(--rs-color-border-base-primary);
overflow: auto;
}

.playgroundPreviewContent {
padding: var(--rs-space-12);
align-items: safe center;
}
}
6 changes: 6 additions & 0 deletions apps/www/src/content/docs/components/navbar/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
.navbar-demo-wrapper {
display: flex;
flex-direction: column;
align-items: flex-start;
width: 100%;
}
Loading
Loading