
Security News
Oxlint Introduces Type-Aware Linting Preview
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
@purple/phoenix-components
Advanced tools
[](https://percy.io/Purple-Technology/phoenix-components)
Our aim is to build a simple React components library using styled-components
and TypeScript.
Phoenix Components takes advantage of some 3rd party libraries to create consistently styled components
@tippyjs/react
- dropdown and positioning engine for the Dropdown componentcountries-and-timezones
- list of timezones for the TimezonePicker componentis-mobile
- detecting mobile device for the Select componentnanoid
- unique string ID generator for Checkbox and Radio componentsnoUiSlider
- complete solution for the Slider (and Range) componentreact-day-picker
- date picker for DatePicker and DateRangePicker componentsreact-dropzone
- drag'n'drop support for the FileUpload componentreact-inlinesvg
- Inline loading of SVG files (to support hover effects) across all components using iconsreact-pdf
- PDF files preview for the FileUpload componentreact-select
- complete solution for the Select componentnpm i @purple/phoenix-components
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
Theme
from Phoenix Components and wrap the app in <ThemeProvider>
from styled-components
providing the Theme
object. If your repository already contains custom styled-components
theme, merge both themes together. Merge should be safe as Phoenix Components use only the object with key $pc
.Also, import <GlobalStyles>
component which provides styles such as default font and sizes, and include it once in your project.
import { ThemeProvider } from 'styled-components'
import { GlobalStyles, Theme } from '@purple/phoenix-components'
...
function App() {
return (
<ThemeProvider theme={Theme}>
<GlobalStyles />
{ ... your app ... }
</ThemeProvider>
)
}
import { TextInput } from '@purple/phoenix-components'
You can either extended the components with styled-components
.
For example:
import styled from 'styled-components'
import { TextInput } from '@purple/phoenix-components'
const StyledInput = styled(TextInput)`
// css overrides here
`
Or you can modify the provided Theme
file that you need to supply to the <ThemeProvider>
and the values inside the $pc
object. For more information about what's possible to customize please refer directly to the file src/theme.tsx
.
In prop tables, all removed properties are listed with notes how to update the component.
Renamed to Notice.
Property | Notes |
---|---|
text | Use children instead. |
centerText | Too specific prop. Centered text in a notice component is discouraged. If needed, however, it can be done manually through child element with custom styling. |
type | Use colorTheme instead. |
contentColor | Use colorTheme instead. |
backgroundColor | Use colorTheme instead. |
title | Use children instead. |
Property | Notes |
---|---|
color | Use colorTheme instead. |
background | Use colorTheme instead. |
Renamed to Checkbox (B lowercase).
Property | Notes |
---|---|
color | Use colorTheme instead. |
Property | Notes |
---|---|
label | Removed. If needed, use standalone component Label . |
Property | Notes |
---|---|
color | Use colorTheme instead. |
Renamed to Select.
Property | Notes |
---|---|
autoComplete | Remove. Select does not support autoComplete prop and it was not used in the v3 anyway. |
description | Description is not part of this component anymore. If any description above the text input is needed, use component Text or Paragraph. |
background | Remove. Should not be desired. We strive for unified design. |
border | Remove. Should not be desired. We strive for unified design. |
rowHeight | Remove without replacement. |
Property | Notes |
---|---|
borderColor | Use colorTheme instead. |
label | Removed. If needed, use standalone component Label . |
Property | Notes |
---|---|
type | Remove without replacement. textarea does not have an attribute type . |
withBorder | Remove without replacement. Should not be desired. We strive for unified design. |
Property | Notes |
---|---|
description | Description is not part of this component anymore. If any description above the text input is needed, create a custom element with custom styling. |
descriptionFontSize | The same applies as for description prop. |
background | Remove without replacement. Background color should not be modified. |
disableErrorText | If we don't want to display error text but want to mark the input as errored, we set the property error to true (instead of string ). |
focusColor | Remove without replacement. Focus color should not be modified. |
FAQs
Our aim is to build a simple React components library using [`styled-components`](https://styled-components.com/) and TypeScript.
The npm package @purple/phoenix-components receives a total of 61 weekly downloads. As such, @purple/phoenix-components popularity was classified as not popular.
We found that @purple/phoenix-components demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 29 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
Oxlint’s new preview brings type-aware linting powered by typescript-go, combining advanced TypeScript rules with native-speed performance.
Security News
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.