Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More →
Socket
Sign inDemoInstall
Socket

react-html-props

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-html-props - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

80

dist/index.d.ts
import * as React from 'react';
export declare type AnchorProps = React.HTMLAttributes<HTMLAnchorElement>;
export declare type AnchorPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>;
export declare type AreaProps = React.HTMLAttributes<HTMLAreaElement>;
export declare type AreaPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLAreaElement>, HTMLAreaElement>;
export declare type AudioProps = React.HTMLAttributes<HTMLAudioElement>;
export declare type AudioPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
export declare type BaseProps = React.HTMLAttributes<HTMLBaseElement>;
export declare type BasePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBaseElement>, HTMLBaseElement>;
export declare type BodyProps = React.HTMLAttributes<HTMLBodyElement>;
export declare type BodyPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>;
export declare type BRProps = React.HTMLAttributes<HTMLBRElement>;
export declare type BRPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLBRElement>, HTMLBRElement>;
export declare type ButtonProps = React.HTMLAttributes<HTMLButtonElement>;
export declare type ButtonPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
export declare type CanvasProps = React.HTMLAttributes<HTMLCanvasElement>;
export declare type CanvasPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
export declare type DataProps = React.HTMLAttributes<HTMLDataElement>;
export declare type DataPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataElement>, HTMLDataElement>;
export declare type DataListProps = React.HTMLAttributes<HTMLDataListElement>;
export declare type DataListPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>;
export declare type DialogProps = React.HTMLAttributes<HTMLDialogElement>;
export declare type DialogPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDialogElement>, HTMLDialogElement>;
export declare type DivProps = React.HTMLAttributes<HTMLDivElement>;
export declare type DivPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
export declare type DLProps = React.HTMLAttributes<HTMLDListElement>;
export declare type DLPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDListElement>, HTMLDListElement>;
export declare type EmbedProps = React.HTMLAttributes<HTMLEmbedElement>;
export declare type EmbedPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>;
export declare type FieldSetProps = React.HTMLAttributes<HTMLFieldSetElement>;
export declare type FieldSetPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>;
export declare type FormProps = React.HTMLAttributes<HTMLFormElement>;
export declare type FormPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLFormElement>, HTMLFormElement>;
export declare type HeadingProps = React.HTMLAttributes<HTMLHeadingElement>;
export declare type HeadingPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>;
export declare type H1Props = HeadingProps;
export declare type H1PropsWithRef = HeadingPropsWithRef;
export declare type H2Props = HeadingProps;
export declare type H2PropsWithRef = HeadingPropsWithRef;
export declare type H3Props = HeadingProps;
export declare type H3PropsWithRef = HeadingPropsWithRef;
export declare type H4Props = HeadingProps;
export declare type H4PropsWithRef = HeadingPropsWithRef;
export declare type H5Props = HeadingProps;
export declare type H5PropsWithRef = HeadingPropsWithRef;
export declare type H6Props = HeadingProps;
export declare type H6PropsWithRef = HeadingPropsWithRef;
export declare type HeadProps = React.HTMLAttributes<HTMLHeadElement>;
export declare type HeadPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>;
export declare type HRProps = React.HTMLAttributes<HTMLHRElement>;
export declare type HRPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>;
export declare type HtmlProps = React.HTMLAttributes<HTMLHtmlElement>;
export declare type HtmlPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>;
export declare type IFrameProps = React.HTMLAttributes<HTMLIFrameElement>;
export declare type IFramePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLIFrameElement>, HTMLIFrameElement>;
export declare type ImgProps = React.HTMLAttributes<HTMLImageElement>;
export declare type ImgPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLImageElement>, HTMLImageElement>;
export declare type InputProps = React.HTMLAttributes<HTMLInputElement>;
export declare type InputPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLInputElement>, HTMLInputElement>;
export declare type ModProps = React.HTMLAttributes<HTMLModElement>;
export declare type ModPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLModElement>, HTMLModElement>;
export declare type InsProps = ModProps;
export declare type InsPropsWithRef = ModPropsWithRef;
export declare type DelProps = ModProps;
export declare type DelPropsWithRef = ModPropsWithRef;
export declare type LabelProps = React.HTMLAttributes<HTMLLabelElement>;
export declare type LabelPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLLabelElement>, HTMLLabelElement>;
export declare type LegendProps = React.HTMLAttributes<HTMLLegendElement>;
export declare type LegendPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>;
export declare type LIProps = React.HTMLAttributes<HTMLLIElement>;
export declare type LIPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLLIElement>, HTMLLIElement>;
export declare type LinkProps = React.HTMLAttributes<HTMLLinkElement>;
export declare type LinkPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLLinkElement>, HTMLLinkElement>;
export declare type MapProps = React.HTMLAttributes<HTMLMapElement>;
export declare type MapPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLMapElement>, HTMLMapElement>;
export declare type MetaProps = React.HTMLAttributes<HTMLMetaElement>;
export declare type MetaPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLMetaElement>, HTMLMetaElement>;
export declare type ObjectProps = React.HTMLAttributes<HTMLObjectElement>;
export declare type ObjectPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLObjectElement>, HTMLObjectElement>;
export declare type OLProps = React.HTMLAttributes<HTMLOListElement>;
export declare type OLPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLOListElement>, HTMLOListElement>;
export declare type OptGroupProps = React.HTMLAttributes<HTMLOptGroupElement>;
export declare type OptGroupPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLOptGroupElement>, HTMLOptGroupElement>;
export declare type OptionProps = React.HTMLAttributes<HTMLOptionElement>;
export declare type OptionPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLOptionElement>, HTMLOptionElement>;
export declare type ParagraphProps = React.HTMLAttributes<HTMLParagraphElement>;
export declare type ParagraphPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>;
export declare type PProps = ParagraphProps;
export declare type PPropsWithRef = ParagraphPropsWithRef;
export declare type ParamProps = React.HTMLAttributes<HTMLParamElement>;
export declare type ParamPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLParamElement>, HTMLParamElement>;
export declare type PreProps = React.HTMLAttributes<HTMLPreElement>;
export declare type PrePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLPreElement>, HTMLPreElement>;
export declare type ProgressProps = React.HTMLAttributes<HTMLProgressElement>;
export declare type ProgressPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLProgressElement>, HTMLProgressElement>;
export declare type QuoteProps = React.HTMLAttributes<HTMLQuoteElement>;
export declare type QuotePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>;
export declare type BlockQuoteProps = QuoteProps;
export declare type BlockQuotePropsWithRef = QuotePropsWithRef;
export declare type QProps = QuoteProps;
export declare type QPropsWithRef = QuotePropsWithRef;
export declare type CiteProps = QuoteProps;
export declare type CitePropsWithRef = QuotePropsWithRef;
export declare type SlotProps = React.HTMLAttributes<HTMLSlotElement>;
export declare type SlotPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLSlotElement>, HTMLSlotElement>;
export declare type ScriptProps = React.HTMLAttributes<HTMLScriptElement>;
export declare type ScriptPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLScriptElement>, HTMLScriptElement>;
export declare type NoScriptProps = ScriptProps;
export declare type NoScriptPropsWithRef = ScriptPropsWithRef;
export declare type SelectProps = React.HTMLAttributes<HTMLSelectElement>;
export declare type SelectPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLSelectElement>, HTMLSelectElement>;
export declare type SourceProps = React.HTMLAttributes<HTMLSourceElement>;
export declare type SourcePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLSourceElement>, HTMLSourceElement>;
export declare type SpanProps = React.HTMLAttributes<HTMLSpanElement>;
export declare type SpanPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>;
export declare type StyleProps = React.HTMLAttributes<HTMLStyleElement>;
export declare type StylePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLStyleElement>, HTMLStyleElement>;
export declare type SVGProps = React.HTMLAttributes<SVGElement>;
export declare type SVGPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<SVGElement>, SVGElement>;
export declare type TableProps = React.HTMLAttributes<HTMLTableElement>;
export declare type TablePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableElement>, HTMLTableElement>;
export declare type TableColProps = React.HTMLAttributes<HTMLTableColElement>;
export declare type TableColPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
export declare type ColProps = TableColProps;
export declare type ColPropsWithRef = TableColPropsWithRef;
export declare type ColGroupProps = TableColProps;
export declare type ColGroupPropsWithRef = TableColPropsWithRef;
export declare type TableDataCellProps = React.HTMLAttributes<HTMLTableDataCellElement>;
export declare type TableDataCellPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableDataCellElement>, HTMLTableDataCellElement>;
export declare type TDProps = TableDataCellProps;
export declare type TDPropsWithRef = TableDataCellPropsWithRef;
export declare type TableHeaderCellProps = React.HTMLAttributes<HTMLTableHeaderCellElement>;
export declare type TableHeaderCellPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>;
export declare type THProps = TableHeaderCellProps;
export declare type THPropsWithRef = TableHeaderCellPropsWithRef;
export declare type TableRowProps = React.HTMLAttributes<HTMLTableRowElement>;
export declare type TableRowPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>;
export declare type TRProps = TableRowProps;
export declare type TRPropsWithRef = TableRowPropsWithRef;
export declare type TableSectionProps = React.HTMLAttributes<HTMLTableSectionElement>;
export declare type TableSectionPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTableSectionElement>, HTMLTableSectionElement>;
export declare type THeadProps = TableSectionProps;
export declare type THeadPropsWithRef = TableSectionPropsWithRef;
export declare type TBodyProps = TableSectionProps;
export declare type TBodyPropsWithRef = TableSectionPropsWithRef;
export declare type TFootProps = TableSectionProps;
export declare type TFootPropsWithRef = TableSectionPropsWithRef;
export declare type TemplateProps = React.HTMLAttributes<HTMLTemplateElement>;
export declare type TemplatePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTemplateElement>, HTMLTemplateElement>;
export declare type TextAreaProps = React.HTMLAttributes<HTMLTextAreaElement>;
export declare type TextAreaPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
export declare type TitleProps = React.HTMLAttributes<HTMLTitleElement>;
export declare type TitlePropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTitleElement>, HTMLTitleElement>;
export declare type TrackProps = React.HTMLAttributes<HTMLTrackElement>;
export declare type TrackPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLTrackElement>, HTMLTrackElement>;
export declare type ULProps = React.HTMLAttributes<HTMLUListElement>;
export declare type ULPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLUListElement>, HTMLUListElement>;
export declare type VideoProps = React.HTMLAttributes<HTMLVideoElement>;
export declare type VideoPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
export declare type WebViewProps = React.HTMLAttributes<HTMLWebViewElement>;
export declare type WebViewPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLWebViewElement>, HTMLWebViewElement>;

2

package.json
{
"name": "react-html-props",
"version": "1.0.7",
"version": "1.0.8",
"author": "Justin Mahar <contact@justinmahar.com>",

@@ -5,0 +5,0 @@ "description": "Convenience TypeScript type definitions for all HTML element props.",

@@ -36,4 +36,2 @@ <h2 align="center">

### Basic Example
Let's use `div` as an example since it's the most common.

@@ -51,3 +49,3 @@

### Unpacking Children
## Unpacking Children

@@ -66,3 +64,3 @@ We can use [object destructuring](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment#object_destructuring) to unpack `children` from the rest of an element's props.

### Mixing With Custom Props
## Mixing With Custom Props

@@ -178,2 +176,20 @@ You will likely have your own props, of course.

> All types have a `WithRef` option that includes a `ref` field. See below.
## Props With Ref
You may need props that include the `ref` field inherited from `React.DetailedHTMLProps`.
For this, all props have a `WithRef` option.
For example, you can use `DivPropsWithRef` for a `div` with a React ref.
Using the `div` example, `DivPropsWithRef` is defined as the following type:
```ts
export type DivPropsWithRef = React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
```
A `ref` may not always be applicable, so it remains optional to give you the flexibility.
## TypeScript

@@ -180,0 +196,0 @@

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