Content-Length: 266677 | pFad | http://github.com/NativeScript/docs/blob/main/content/ui/segmented-bar.md

FE docs/content/ui/segmented-bar.md at main · NativeScript/docs · GitHub
Skip to content

Files

Latest commit

 Cannot retrieve latest commit at this time.

History

History
123 lines (79 loc) · 2.35 KB

segmented-bar.md

File metadata and controls

123 lines (79 loc) · 2.35 KB
title description contributors
SegmentedBar
UI component for discrete slection.
rigor789
Ombuweb

<SegmentedBar> is a UI bar component that displays a set of buttons for discrete selection.

<<< @/../examples/typescript/src/ui/SegmentedBar/template.xml#example

<<< @/../examples/angular/src/ui/SegmentedBar/component.html#example

<<< @/../examples/react/src/components/ui/segmentedbar.tsx#example

<<< @/../examples/solid/src/ui/segmentedbar.tsx#example

<<< @/../examples/svelte/app/components/ui/SegmentedBar.svelte#example

<<< @/../examples/vue/src/ui/SegmentedBar/component.vue#example

Props

items

items: SegmentedBarItem[]

An array of items to be displayed in the SegmentedBar.

selectedIndex

selectedIndex: number

Gets or sets the index of the selected item.

selectedBackgroundColor

selectedBackgroundColor: Color

Gets or sets the background color of the selected item.

To set the background color of the entire bar, use backgroundColor.

See Color.

selectedTextColor

selectedTextColor: Color

Gets or sets the text color of the selected item.

To set the text color of the entire bar, use selectedTextColor.

See Color.

...Inherited

For additional inherited properties, refer to the API Reference.

SegmentedBarItem Props

title

title: string

Gets or sets the title of the SegmentedBarItem.

Events

selectedIndexChanged

on('selectedIndexChanged', (args: EventData) => {
  const segmentedBar = args.object as SegmentedBar
  console.log('SegmentedBar index changed to:', segmentedBar.selectedIndex)
})

Emitted when an item in the SegmentedBar is tapped.

Native component









ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/NativeScript/docs/blob/main/content/ui/segmented-bar.md

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy