# Top Tabs

Top Bar provides top navigation.

```jsx
 import { RadioGroup } from '../components'
 
 <View>
   <RadioGroup
      items={items}
      selectedIndex={tab1State}
      onChange={index => setTab1State(index)}
      underline
    />
    <Text>{items[tab1State]}</Text>
</View>
```

Tabs also may contain `icons`, to provide a better user interfaces.

```jsx
  import { RadioGroup } from '../components'
  
  <View>
   <RadioGroup
      items={[
              <View
                style={{
                  alignItems: 'center',
                  flexDirection: 'row',
                  color: 'inherit',
                }}
              >
                <Text style={{ color: 'inherit' }}>One</Text>
                <Icon name={'staro'} size={20} style={{ marginLeft: 5 }} />
              </View>,
              <View
                style={{
                  alignItems: 'center',
                  flexDirection: 'row',
                  color: 'inherit',
                }}
              >
                <Text>Two</Text>
                <Icon name={'staro'} size={20} style={{ marginLeft: 5 }} />
              </View>,
              <View
                style={{
                  alignItems: 'center',
                  flexDirection: 'row',
                  color: 'inherit',
                }}
              >
                <Text>Three</Text>
                <Icon name={'staro'} size={20} style={{ marginLeft: 5 }} />
              </View>,
            ]}
      selectedIndex={tab1State}
      onChange={index => setTab1State(index)}
      underline
    />
    <Text>{items[tab1State]}</Text>
</View>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.reactnativestarter.com/components/top-tabs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
