![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@snack-uikit/button
Advanced tools
npm i @snack-uikit/button
import { ButtonFilled, ButtonFunction, ButtonSimple } from "@snack-uikit/button";
import { Counter } from "@snack-uikit/counter";
import { DaySVG } from "@snack-uikit/icons";
<ButtonFilled
label='Navigate'
onClick={() => navigate()}
icon={<DaySVG />}
size='m'
appearance='primary'
href='https://cloud.ru/'
target='_blank'
disabled={true}
loading={true}
/>
<ButtonSimple
label='Submit'
onClick={() => sendForm()}
/>
const CounterProps = {
value: 7,
appearance: 'red',
}
<ButtonFunction
label='Unread Messages'
onClick={() => openMessages()}
counter={CounterProps}
/>
name | type | default value | description |
---|---|---|---|
href | string | - | Ссылка |
target | HTMLAttributeAnchorTarget | _blank | HTML-аттрибут target |
className | string | - | CSS-класс |
disabled | boolean | - | Флаг неактивности компонента |
icon | ReactElement | - | Иконка |
label | string | - | Текст кнопки |
loading | boolean | - | Флаг состояния загрузки |
onClick | MouseEventHandler<HTMLElement> | - | Колбек обработки клика |
onKeyDown | KeyboardEventHandler<HTMLElement> | - | Колбек обработки нажатия клавиши |
onFocus | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки фокуса |
onBlur | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки блюра |
size | enum Size: "xs" , "s" , "m" , "l" | s | Размер |
appearance | enum Appearance: "primary" , "neutral" , "destructive" | primary | Внешний вид кнопки |
type | "submit" | "reset" | "button" | button | HTML-аттрибут type |
tabIndex | number | - | HTML-аттрибут tab-index |
fullWidth | boolean | - | Сделать кнопку во всю ширину |
ref | LegacyRef<HTMLButtonElement | HTMLAnchorElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
key | Key | - |
name | type | default value | description |
---|---|---|---|
href | string | - | Ссылка |
target | HTMLAttributeAnchorTarget | _blank | HTML-аттрибут target |
className | string | - | CSS-класс |
disabled | boolean | - | Флаг неактивности компонента |
icon | ReactElement | - | Иконка |
label | string | - | Текст кнопки |
loading | boolean | - | Флаг состояния загрузки |
onClick | MouseEventHandler<HTMLElement> | - | Колбек обработки клика |
onKeyDown | KeyboardEventHandler<HTMLElement> | - | Колбек обработки нажатия клавиши |
onFocus | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки фокуса |
onBlur | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки блюра |
size | enum Size: "xs" , "s" , "m" , "l" | s | Размер |
appearance | enum Appearance: "primary" , "neutral" , "destructive" | neutral | Внешний вид кнопки |
type | "submit" | "reset" | "button" | button | HTML-аттрибут type |
tabIndex | number | - | HTML-аттрибут tab-index |
fullWidth | boolean | - | Сделать кнопку во всю ширину |
ref | LegacyRef<HTMLButtonElement | HTMLAnchorElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
key | Key | - |
name | type | default value | description |
---|---|---|---|
href | string | - | Ссылка |
target | HTMLAttributeAnchorTarget | _blank | HTML-аттрибут target |
className | string | - | CSS-класс |
disabled | boolean | - | Флаг неактивности компонента |
icon | ReactElement | - | Иконка |
label | string | - | Текст кнопки |
loading | boolean | - | Флаг состояния загрузки |
onClick | MouseEventHandler<HTMLElement> | - | Колбек обработки клика |
onKeyDown | KeyboardEventHandler<HTMLElement> | - | Колбек обработки нажатия клавиши |
onFocus | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки фокуса |
onBlur | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки блюра |
size | enum Size: "xs" , "s" , "m" , "l" | s | Размер |
appearance | enum Appearance: "primary" , "neutral" , "destructive" | primary | Внешний вид кнопки |
type | "submit" | "reset" | "button" | button | HTML-аттрибут type |
tabIndex | number | - | HTML-аттрибут tab-index |
fullWidth | boolean | - | Сделать кнопку во всю ширину |
ref | LegacyRef<HTMLButtonElement | HTMLAnchorElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
key | Key | - |
name | type | default value | description |
---|---|---|---|
href | string | - | Ссылка |
target | HTMLAttributeAnchorTarget | _blank | HTML-аттрибут target |
className | string | - | CSS-класс |
disabled | boolean | - | Флаг неактивности компонента |
icon | ReactElement | - | Иконка |
label | string | - | Текст кнопки |
loading | boolean | - | Флаг состояния загрузки |
onClick | MouseEventHandler<HTMLElement> | - | Колбек обработки клика |
onKeyDown | KeyboardEventHandler<HTMLElement> | - | Колбек обработки нажатия клавиши |
onFocus | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки фокуса |
onBlur | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки блюра |
size | enum Size: "xs" , "s" , "m" , "l" | s | Размер |
appearance | enum Appearance: "primary" , "neutral" , "destructive" | primary | Внешний вид кнопки |
type | "submit" | "reset" | "button" | button | HTML-аттрибут type |
tabIndex | number | - | HTML-аттрибут tab-index |
fullWidth | boolean | - | Сделать кнопку во всю ширину |
ref | LegacyRef<HTMLButtonElement | HTMLAnchorElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
key | Key | - |
name | type | default value | description |
---|---|---|---|
href | string | - | Ссылка |
target | HTMLAttributeAnchorTarget | _blank | HTML-аттрибут target |
className | string | - | CSS-класс |
disabled | boolean | - | Флаг неактивности компонента |
icon | ReactElement | - | Иконка |
iconPosition | enum IconPosition: "before" , "after" | after | Позиция иконки |
label | string | - | Текст кнопки |
loading | boolean | - | Флаг состояния загрузки |
onClick | MouseEventHandler<HTMLElement> | - | Колбек обработки клика |
onKeyDown | KeyboardEventHandler<HTMLElement> | - | Колбек обработки нажатия клавиши |
onFocus | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки фокуса |
onBlur | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки блюра |
size | enum Size: "xs" , "s" , "m" , "l" | s | Размер |
appearance | enum Appearance: "primary" , "neutral" , "destructive" | neutral | Внешний вид кнопки |
type | "submit" | "reset" | "button" | button | HTML-аттрибут type |
tabIndex | number | - | HTML-аттрибут tab-index |
fullWidth | boolean | - | Сделать кнопку во всю ширину |
counter | CounterInButtonProps | - | Пропсы каунтера в кнопке |
ref | LegacyRef<HTMLButtonElement | HTMLAnchorElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
key | Key | - |
name | type | default value | description |
---|---|---|---|
href | string | - | Ссылка |
target | HTMLAttributeAnchorTarget | _blank | HTML-аттрибут target |
className | string | - | CSS-класс |
disabled | boolean | - | Флаг неактивности компонента |
icon | ReactElement | - | Иконка |
loading | boolean | - | Флаг состояния загрузки |
onClick | MouseEventHandler<HTMLElement> | - | Колбек обработки клика |
onKeyDown | KeyboardEventHandler<HTMLElement> | - | Колбек обработки нажатия клавиши |
onFocus | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки фокуса |
onBlur | FocusEventHandler<HTMLButtonElement | HTMLAnchorElement> | - | Колбек обработки блюра |
type | "submit" | "reset" | "button" | button | HTML-аттрибут type |
tabIndex | number | - | HTML-аттрибут tab-index |
size | enum Size: "xs" , "s" , "m" , "l" | s | Размер |
ref | LegacyRef<HTMLButtonElement | HTMLAnchorElement> | - | Allows getting a ref to the component instance. Once the component unmounts, React will set ref.current to null (or call the ref with null if you passed a callback ref). @see {@link https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom React Docs} |
key | Key | - |
FAQs
Кнопка в различных вариациях
The npm package @snack-uikit/button receives a total of 1,633 weekly downloads. As such, @snack-uikit/button popularity was classified as popular.
We found that @snack-uikit/button demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.