New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-segmented-picker

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-segmented-picker

The iOS Segmented Picker in react.js

latest
Source
npmnpm
Version
1.4.0
Version published
Maintainers
1
Created
Source

react-segmented-picker

Build Status

An iOS style segmented picker for react web

Demo (the bar next to "All Posts")

Install

npm i react styled-components --save-dev
npm i react-segmented-picker

or

yarn add react styled-components -D
yarn add react-segmented-picker

Usage

import React, { useState } from 'react';

import SegmentedPicker from 'react-segmented-picker';

// Demo App
function App() {
  const [selection, setSelection] = useState(0);
  const options = ['Apple', 'Orange', 'Pear', 'Watermelon'];

  return (
    <div className="App">
      <p>You selected</p>
      <p>#{selection}: {options[selection]}</p>

      <SegmentedPicker
        options={options}
        selection={selection}
        onSelectionChange={(newSelection) => {
          setSelection(newSelection);
        }}
      />
    </div>
  );
}

export default App;

Keywords

front-end

FAQs

Package last updated on 15 Aug 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts