- Basic Example
- With navigation
- Extra elements
In order to create consitent UI, we are including some handy components for building TopBar in a simplest way possible. Of course, you don't have to limit yourself to these examples, but it's the fastest way to build the top bars that matches the design language of the kit!
This page offers some specific examples of how to build your perfect TopBar. Make sure you visit Building Layout page as well!
<> <TopBar> <TopBarSection> <TopBarTitle> Dashboard </TopBarTitle> </TopBarSection> <TopBarSection> <Button primary> Login </Button> </TopBarSection> </TopBar> <section style={{ background: 'var(--bg-base)', padding: 50, textAlign: 'center' }} > Some content </section> </>
<section class="top-bar"> <div class="top-bar-section"> <h2 class="top-bar-title">Dashboard</h2> </div> <div class="top-bar-section"> <button class="btn btn-primary" type="button" role="button">Login</button> </div> </section> <section style="text-align:center;padding:50px;background:var(--bg-base)">Some content</section>
<> <TopBar> <TopBarSection> <TopBarSection> <TopBarTitle> Dashboard </TopBarTitle> <TopBarSection /> <TopBarLinkContainer> <TopBarLink href="#"> Link 1 </TopBarLink> <TopBarLink className="active" href="#"> Link 2 </TopBarLink> </TopBarLinkContainer> </TopBarSection> </TopBarSection> <TopBarSection> <TopBarSection> <TopBarLinkContainer> <TopBarLink href="#"> Link 3 </TopBarLink> <TopBarLink href="#"> Link 4 </TopBarLink> </TopBarLinkContainer> </TopBarSection> <TopBarSection> <Button primary> Login </Button> </TopBarSection> </TopBarSection> </TopBar> <section style={{ background: 'var(--bg-base)', padding: 50, textAlign: 'center' }} > Some content </section> </>
<section class="top-bar"> <div class="top-bar-section"> <div class="top-bar-section"> <h2 class="top-bar-title">Dashboard</h2> <div class="top-bar-section"></div> <nav class="top-bar-link-container"> <a class="top-bar-link" href="#">Link 1</a> <a class="top-bar-link active" href="#">Link 2</a> </nav> </div> </div> <div class="top-bar-section"> <div class="top-bar-section"> <nav class="top-bar-link-container"> <a class="top-bar-link" href="#">Link 3</a> <a class="top-bar-link" href="#">Link 4</a> </nav> </div> <div class="top-bar-section"> <button class="btn btn-primary" type="button" role="button">Login</button> </div> </div> </section> <section style="text-align:center;padding:50px;background:var(--bg-base)">Some content</section>
<> <TopBar> <TopBarSection> <TopBarSection> <TopBarTitle> <Icon className="c-primary"> front_store </Icon> Dashboard </TopBarTitle> <TopBarSection /> <TopBarLinkContainer> <TopBarLink href="#"> Link 1 </TopBarLink> <TopBarLink className="active" href="#"> Link 2 </TopBarLink> </TopBarLinkContainer> </TopBarSection> </TopBarSection> <TopBarSection> <TextField placeholder="Search for lemonades" rightEl={<Icon>search_left</Icon>} /> </TopBarSection> </TopBar> <section style={{ background: 'var(--bg-base)', padding: 50, textAlign: 'center' }} > Some content </section> </>
<section class="top-bar"> <div class="top-bar-section"> <div class="top-bar-section"> <h2 class="top-bar-title"> <i class="uikon c-primary">front_store</i>Dashboard </h2> <div class="top-bar-section"></div> <nav class="top-bar-link-container"> <a class="top-bar-link" href="#">Link 1</a> <a class="top-bar-link active" href="#">Link 2</a> </nav> </div> </div> <div class="top-bar-section"> <div class="form-group"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search for lemonades" /> <div class="input-group-append"> <i class="uikon">search_left</i> </div> </div> </div> </div> </section> <section style="text-align:center;padding:50px;background:var(--bg-base)">Some content</section>