Socket
Socket
Sign inDemoInstall

formsy-semantic-ui-react

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formsy-semantic-ui-react

Formsy wrappers for Semantic-Ui-React form elements


Version published
Weekly downloads
761
increased by11.75%
Maintainers
1
Weekly downloads
 
Created
Source

Lets you create formsy-react forms with Semantic-Ui-React components.

Installation

$ npm install formsy-semantic-ui-react --save

You will also need formsy-react

$ npm install formsy-react --save

Usage

The Components:

import { Input } from 'formsy-semantic-ui-react';
import { TextArea } from 'formsy-semantic-ui-react';
import { Checkbox } from 'formsy-semantic-ui-react';
import { Radio } from 'formsy-semantic-ui-react';
import { RadioGroup } from 'formsy-semantic-ui-react';
import { Dropdown } from 'formsy-semantic-ui-react';
import { Select } from 'formsy-semantic-ui-react';

You'll need to wrap them with Formsy.Form

import { Form } from 'formsy-react';

validation

For more information on validation, check out Formsy-React's Dcoumentaion

<Form
  noValidate
  onValidSubmit={ onSubmit }
  onInvalidSubmit={ onInvalidSubmit }
>
  <Input
    name="email"
    placeholder="Email"
    icon="at"
    iconPosition="left"
    required
    validations="isEmail"
    validationErrors={{
      isEmail: 'This is not a valid Email',
      isDefaultRequiredValue: 'Email is required',
    }}
  />
  </Form>

Displaying Error Messages

To display error messages, pass an element through the errorLabel prop.

Example: You can display Semaintic-UI-React's <Label/> compnent:

<Checkbox
  ...
  errorLabel={ <Label basic color="orange" pointing="left"/> }
/>

You can also pass in a custom component with the desired styles.

License: MIT

Keywords

FAQs

Package last updated on 13 Jan 2017

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc