UNPKG

@progress/kendo-layout-react-wrapper

Version:

Kendo UI Layout wrapper for React

84 lines (72 loc) 4.77 kB
--- title: Keyboard Navigation page_title: Keyboard Navigation - TabStrip - Kendo UI Wrappers for React description: "Use the Kendo UI TabStrip keyboard navigation in React projects." slug: keyboard_navigation_tabstrip position: 4 --- # Keyboard Navigation By default, the keyboard navigation of the TabStrip is enabled. The TabStrip supports the following keyboard shortcuts: | Shortcut | Description | |:--- |:--- | | `Left Arrow` | Selects the previous tab. If no previous tab is available, selects the last tab. | | `Right Arrow` | Selects the next tab. If no next tab is available, selects the first tab. | | `Home` | Selects the first tab. | | `End` | Selects the last tab. | ```jsx-preview class LayoutsContainer extends React.Component { disableTab(){ var tabStrip = $("[data-role='tabstrip']").kendoTabStrip().data("kendoTabStrip"); tabStrip.disable(tabStrip.tabGroup.children().eq(0)); } enableTab(){ var tabStrip = $("[data-role='tabstrip']").kendoTabStrip().data("kendoTabStrip"); tabStrip.enable(tabStrip.tabGroup.children().eq(0)); } render() { return ( <div className="example-wrapper"> <p> TabStrip </p> <TabStrip id="tabstrip" value="Tallinn"> <Tabs> <Tab>Paris</Tab> <Tab>New York</Tab> <Tab>Tallinn</Tab> </Tabs> <Content> <p> Paris is the capital and most populous city of France. It has an area of 105 square kilometres (41 square miles) and a population in 2013 of 2,229,621 within its administrative limits. The city is both a commune and department, and forms the centre and headquarters of the Île-de-France, or Paris Region, which has an area of 12,012 square kilometres (4,638 square miles) and a population in 2014 of 12,005,077, comprising 18.2 percent of the population of France. </p> </Content> <Content> <p> The City of New York, often called New York City or simply New York, is the most populous city in the United States. With an estimated 2015 population of 8,550,405 distributed over a land area of just 305 square miles (790 km2), New York City is also the most densely populated major city in the United States. Located at the southern tip of the state of New York, the city is the center of the New York metropolitan area, one of the most populous urban agglomerations in the world. </p> <p> A global power city, New York City exerts a significant impact upon commerce, finance, media, art, fashion, research, technology, education, and entertainment, its fast pace defining the term New York minute. Home to the headquarters of the United Nations, New York is an important center for international diplomacy and has been described as the cultural and financial capital of the world. </p> </Content> <Content> <p> Tallinn is the capital and largest city of Estonia. It is situated on the northern coast of the country, on the shore of the Gulf of Finland, 80 km (50 mi) south of Helsinki, east of Stockholm and west of Saint Petersburg. From the 13th century until 1918 (and briefly during the Nazi occupation of Estonia from 1941 to 1944), the city was known as Reval. Tallinn occupies an area of 159.2 km2 (61.5 sq mi) and has a population of 443,894. Approximately 32% of Estonia's total population lives in Tallinn. </p> <p> Tallinn was founded in 1248, but the earliest human settlements are over 5,000 years old, making it one of the oldest capital cities of Northern Europe. Due to its strategic location, the city became a major trade hub, especially from the 14th to the 16th century, when it grew in importance as part of the Hanseatic League. </p> </Content> </TabStrip> <a className={"k-button"} onClick={this.disableTab}>Disable first tab</a> <a className={"k-button"} onClick={this.enableTab}>Enable first tab</a> </div> ); } } ReactDOM.render( <LayoutsContainer />, document.querySelector('my-app') ); ``` ## Suggested Links * [Kendo UI TabStrip for jQuery](https://docs.telerik.com/kendo-ui/controls/navigation/tabstrip/overview) * [API Reference of the TabStrip Widget](https://docs.telerik.com/kendo-ui/api/javascript/ui/tabstrip)